Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
piyushg098
Channel Surfer

Roku Video Controls not showing

I want to show up a video on a Panel. The project I am working on uses Sliding Panel component. So what I intend to do is on clicking a label list, I want to open a panel in fullscreen mode. This panel has a video node and will play video. Everything works fine but I cannot see the video controls on my video. The video will pause, play, rewind and forward from remote and the same is not displayed on video.
This is my panel component
<?xml version="1.0" encoding="UTF-8"?>
<component name="VideoScreen" extends="Panel"
xsi:noNamespaceSchemaLocation="http://rokudev.roku.com/rokudev/schema/RokuSceneGraph.xsd">
<script type="text/brightscript" uri="pkg:/components/Screens/Video/VideoScreen.brs" />
<interface>
<field id="videoURL" type="String" onChange="play"></field>
<field id="videoTitle" type="String"></field>
</interface>

<children>
<Group id="groupSignInScreen" translation="[0, -173]">
<Video id="VideoPlayer" width="1920" height="1080" translation="[0,0]" />
</Group>
</children>
</component>


In the brs file for above I do following:


sub init()
  m.top.panelSize = "full"
  m.top.leftPosition = 0
  m.top.isFullScreen = true
  
  m.video = m.top.findNode("VideoPlayer")
  m.video.observeField("state", "onVideoPlaybackFinished")
end sub
 
sub play()
    setVideo()
end sub

function setVideo() as void
  videoContent = createObject("RoSGNode", "ContentNode")
  videoContent.url = "http://roku.cpl.delvenetworks.com/media/59021fabe3b645968e382ac726cd6c7b/decbe34b64ea4ca281dc09997d0f23fd/aac0cfc54ae74fdfbb3ba9a2ef4c7080/117_segment_2_twitch__nw_060515.mp4"
  videoContent.title = "Test Video"
  videoContent.streamformat = "mp4"
  m.video.content = videoContent
  m.video.setFocus(true)
  m.video.control = "play"
  
end function

function onVideoPlaybackFinished()
       print m.video.state
end function


Can anyone tell me where I am going wrong? If I perform everything in a Scene, it works fine. I do see the controls visible on my video. But when I do it on a Panel, it's not showing up!
0 Kudos