Hello,
I’m trying to create a channel from scratch that launches a video link and allows users to display a list of the other available channels while the video is still playing (a text list at the left of the screen).
If the user clicks on a link, the new video launches and the list disappears until he presses the OK button to make the list appear
without stopping the videoI created the following folders + a manifest file:
- Components
- Images
- channels
- source
in the channels folder I created the following xml file :
<?xml version = "1.0" encoding = "utf-8" standalone = "yes" ?>
<VideoContent >
<video
title = "AAA"
streamformat = "hls"
url = "link.hls" />
<video
title = "BBB"
streamformat = "hls"
url = "link.hls" />
<video
title = "CCC"
streamformat = "hls"
url = "link.hls" />
</VideoContent>
in the Components folder I created the following xml file :
<?xml version="1.0" encoding="utf-8" ?>
<component name = "my videos" extends = "Group" >
<script type = "text/brightscript" >
<![CDATA[
sub init()
setVideo()
end sub
sub setVideo()
videoContent = createObject("RoSGNode", "ContentNode")
videoContent.title = "video"
videoContent.streamformat = "hls"
videoContent.url = "link.m3u8"
m.video = m.top.findNode("video")
m.video.content = videoContent
m.video.control = "play"
end sub
function onKeyEvent(key as String, press as Boolean) as Boolean
if press then
if key = "ok"
m.videolist.setFocus(true)
return true
end if
end if
return false
end function
]]>
</script>
<children>
<Video
id = "video"
width = "1280"
height = "720" />
<LabelList id = "MyList" >
<ContentNode role = "content" >
<ContentNode title = "Link 1" />
<ContentNode title = "Link 2" />
<ContentNode title = "Link 3" />
</ContentNode>
</LabelList>
</children>
</component>
When I launch the channel the video plays and I can see the list (I can't scroll down though).
How do I link the videos in the channel's folder to the list in my components XML file ?
Do you see something else missing in my code ?
Thank you for your help