Pilot Script to Load Viz One Clips (Not using the media tab)

ghood1975

New member
Hello,
I have a content pilot template with a list of team names. We have all the team logos in Viz One as clips. I don't want the graphics operator to have to click on the video icon in the template in order to load the clip. I would like to have a dropdown in the template, depending on the item index selected, it would fill in the necessary fields of the Get Video icon for the control video plugin in the scene. I've experimented with the below Pilot code and it loads the Viz One thumbnails in the template, but does not load the clip info, nor does it trigger the transfer in the content pilot playlist, nor does it put the .mxf filename into the scene's clip channel.


Sub Clip_DropdownChange(Sender)

if Clip_Dropdown.itemindex = 1 then
'Clip - Smoky forest
media_Clip.AssetUri = "http://vizone.atl.weather.com/thirdparty/asset/item/2102311080004320221"
media_Clip.ThumbFilename = "http://vizone.atl.weather.com/ardok...dok-index/GAL18799075/2102311080004320221.jpg"

elseif Clip_Dropdown.itemindex = 2 then
'Clip - Smoky forest phone video
media_Clip.AssetUri = "http://vizone.atl.weather.com/thirdparty/asset/item/2102311080004320021"
media_Clip.ThumbFilename = "http://vizone.atl.weather.com/ardok...dok-index/GAL18800838/2102311080004320021.jpg"

elseif Clip_Dropdown.itemindex = 3 then
'Clip - Red Trees
media_Clip.AssetUri = "http://vizone.atl.weather.com/thirdparty/asset/item/2102311080004319721"
media_Clip.ThumbFilename = "http://vizone.atl.weather.com/ardok...dok-index/GAL18798401/2102311080004319721.jpg"

elseif Clip_Dropdown.itemindex = 4 then
'Clip - Hoy
media_Clip.AssetUri = "http://vizone.atl.weather.com/thirdparty/asset/item/2102311080004319421"
media_Clip.ThumbFilename = "http://vizone.atl.weather.com/ardok...dok-index/GAL18798917/2102311080004319421.jpg"

elseif Clip_Dropdown.itemindex = 5 then
'Clip - Jellyfish
media_Clip.AssetUri = "http://vizone.atl.weather.com/thirdparty/asset/item/2102311080004318521"
media_Clip.ThumbFilename = "http://vizone.atl.weather.com/ardok...dok-index/GAL18314442/2102311080004318521.jpg"
end if

End sub
 
Hello,
Try this template, it might help you generate data that you can store in your lists:

VizOne1.JPG

Download template: GetVizOneMedia.wtw

J.

Code:
Const uriVizOne = "https://<VizOne>"
Const engineClipDataDir = "G:\VizOne\"

Sub InitForm
    feedVideo.Source = uriVizOne & "/thirdparty/asset/item?q=*&media=video"
    feedImage.Source = uriVizOne & "/thirdparty/asset/item?q=*&media=image"
    ctrlImage.PicFilename = ""
    ctrlImage.ThumbFilename = ""
    ctrlVideo.PicFilename = ""
    ctrlVideo.ThumbFilename = ""
    txtImageSource.Text = ""
    txtVideoSource.Text = ""
End Sub

Sub feedImageFeedItemSelected(entry)
    Set xmlDoc = CreateObject("MSXML2.DOMDocument")
    xmlDoc.async = False
    xmlDoc.loadXML(entry.xml)
    If Not xmlDoc.SelectSingleNode("//content") Is Nothing Then
       ctrlImage.PicFilename = xmlDoc.SelectSingleNode("//content").getAttribute("src")
       txtImageSource.Text = ctrlImage.PicFilename
    End If
    If Not xmlDoc.SelectSingleNode("//media:thumbnail") Is Nothing Then
       ctrlImage.ThumbFilenameW = xmlDoc.SelectSingleNode("//media:thumbnail").getAttribute("url")
    End If
End sub

Sub feedVideoFeedItemSelected(entry)
    xml = "<?xml version=""1.0"" encoding=""utf-8""?>" & vbCrLf
    xml = xml & entry.xml & vbCrLf
    Set xmlDoc = CreateObject("MSXML2.DOMDocument")
    xmlDoc.async = False
    xmlDoc.loadXML(entry.xml)
    If Not xmlDoc.SelectSingleNode("//mam:derivativefilename") Is Nothing Then
       txtVideoSource.Text = engineClipDataDir & xmlDoc.SelectSingleNode("//mam:derivativefilename").Text
    End If
    If Not xmlDoc.SelectSingleNode("//media:thumbnail") Is Nothing Then
       ctrlVideo.ThumbFilename = xmlDoc.SelectSingleNode("//media:thumbnail").getAttribute("url")
    End If
    If Not xmlDoc.SelectSingleNode("//link") Is Nothing Then
       ctrlVideo.AssetURI = xmlDoc.SelectSingleNode("//link").getAttribute("href")
    End If
    For Each item In xmlDoc.selectNodes("//entry/media:group/media:content")
       If item.SelectSingleNode("@type").Text = "video/mp4" Then
          xml = xml & "|" & item.SelectSingleNode("@url").Text
       End If
    Next
    ctrlVideo.PicFilename = xml
    ctrlVideo.PicFilenameW = xml
End sub
 
Back
Top