Hey
I am trying to implement image canvas on video screen.Every things works fine expect that the controls of video screen are not visible.Help me with this issue.
Sub main()
port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
episode=CreateObject("roAssociativeArray")
episode.HDBranded = false
episode.IsHD = false
episode.Stream = { url:"http://download.wavetlan.com/SVV/Media/HTTP/H264/Other_Media/H264_test5_voice_mp4_480x360.mp4",
bitrate:2000
quality:false
contentid:"mycontent-2000"
}
episode.StreamFormat= "mp4"
canvasItems = [
{
Text:"The Server will go down"
TextAttrs:{Color:"#0000000", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:390,y:357,w:500,h:60}
}
]
canvasItems1 = [
{
Text:"Hello ImageCanvas"
TextAttrs:{Color:"#0000000", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:390,y:357,w:500,h:60}
}
]
canvas = CreateObject("roImageCanvas")
'port = CreateObject("roMessagePort")
canvas.SetMessagePort(port)
'Set opaque background
' canvas.SetLayer(0, {Color:"#FF000000", CompositionMode:"Source"})
'canvas.SetRequireAllImagesToDraw(true)
screen.SetContent(episode)
screen.SetMessagePort(port)
screen.Show()
' ' canvas.SetLayer(0, { Color: "#80000000", CompositionMode: "Source" })
canvas.SetLayer(0, canvasItems)
canvas.Show()
while true
msg = wait(0, port)
index = msg.GetIndex()
if type(msg) = "roVideoScreenEvent" then
print "showVideoScreen | Playback position = "; msg.isPlaybackPosition() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
else if msg.isStatusMessage()
print "status message: "; msg.GetMessage()
else if msg.isPlaybackPosition()
print "playback position: "; msg.GetIndex()
else if msg.isStreamSegmentInfo()
print "playback info"
print msg.GetMessage()
exit while
else if msg.isPartialResult()
print "playback interrupted"
exit while
else if msg.isRequestFailed()
print "request failed – error: "; msg.GetIndex();" – "; msg.GetMessage()
exit while
end if
end if
end while
End Sub