Hi Team,
I have tried to display the video controls but i ends with fail. Only satisfaction is video is working without controls. Anyone Please help me on this to display the video controls (play, pause, mute and prebuffer).
My Code:
XML:<Rectangle
id = "infoRectangle" height = "510" width = "420" color = "167C80" translation = "[0,45]" > <Video id = "exampleVideo" height = "230" width = "420" enableUI="true" /></Rectangle>Interface: <interface >
<field id = "videourl" type = "string" onChange = "showdescription" /> </interface>Onchange Function "showdescription":sub showdescription() videocontent = createObject("RoSGNode", "ContentNode") videocontent.title = "Example Video" videocontent.streamformat = "mp4" 'videocontent.url = "http://roku.cpl.delvenetworks.com/media/59021fabe3b645968e382ac726cd6c7b/f8de8daf2ba34aeb90edc55b2d3..." videocontent.url = m.top.videourl print m.top.videourl m.video = m.top.findNode("exampleVideo") m.video.content = videocontent m.video.setFocus(true) m.video.control = "stop" m.video.loop = true end sub Keyevent Function:function onKeyEvent(key as String,press as Boolean) as Boolean
if press then
if key = "back"
m.infoImage.visible = true
print "key press"
print key
print m.video.state
if (m.video.state = "playing")
m.video.control = "stop"
end if
end if
if key = "options"
print "key press"
print key
m.video.control = "play"
m.infoImage.visible = false
end if
end if
return false
end function