retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016
12:37 PM
RoTuner API (Use outside of Scene Graph)
How does one use the roTuner API with ifVideoPlayer? I've tried to copy the way Content-Metadata is configured in the Scene Graph (SimpleTuner) example but I get a "failed to create media player" error every time. Are there any constraints when using Broadcast video vs streaming? I might have triggered this error by also using SetDestinationRect.
Any help would be greatly appreciated.
Any help would be greatly appreciated.
15 REPLIES 15

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016
01:23 PM
Re: RoTuner API (Use outside of Scene Graph)
Looking into it...
- Joel
- Joel
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016
01:57 PM
Re: RoTuner API (Use outside of Scene Graph)
😄 😄
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016
02:48 PM
Re: RoTuner API (Use outside of Scene Graph)
Joel, the "GetNowNextPrograms" method on roProgramGuide also doesn't exist. I get a BrightScript error. I'm the latest TCL TV firmware (7.1).
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016
02:52 PM
Re: RoTuner API (Use outside of Scene Graph)
Figured out the issue. I can literally just pass the content_metadata value from channel info to ifvideoplayer. Trying to create an AA that looks like the example doesn't work.
artesea
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016
07:16 AM
Re: RoTuner API (Use outside of Scene Graph)
"retrotom" wrote:
Figured out the issue. I can literally just pass the content_metadata value from channel info to ifvideoplayer. Trying to create an AA that looks like the example doesn't work.
Have you got an example of what you did? I was playing about with the roTuner stuff last week and could only get the Screne Graph stuff to work, and I've yet to dive down that path.
I want to guess that you've done something like this, but I'm away from the kit to test
tuner = CreateObject("roTuner")
if (tuner <> invalid)
channels = tuner.GetChannelList()
channelInfo = tuner.GetChannelInfo(channels[0])
if channelInfo <> invalid
port = CreateObject("roMessagePort")
canvas = CreateObject("roImageCanvas")
canvas.SetMessagePort(port)
canvas.SetLayer(0, { color: "#00000000", CompositionMode: "Source" })
canvas.Show()
player = CreateObject("roVideoPlayer")
player.SetMessagePort(port)
player.SetDestinationRect(canvas.GetCanvasRect())
player.SetContentList(channelInfo.content_metadata)
player.Play()
while true
msg = Wait(0, port)
if msg.isRemoteKeyPressed()
index = msg.GetIndex()
if index = 0 ' <BACK>
print "Closing video screen"
player.Stop()
exit while
end if
end if
end while
end if
end if
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016
09:10 AM
Re: RoTuner API (Use outside of Scene Graph)
Your mistake is with this line (I think):
It should be:
To make it into an array.
player.SetContentList(channelInfo.content_metadata)
It should be:
player.SetContentList([channelInfo.content_metadata])
To make it into an array.
artesea
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016
03:07 PM
Re: RoTuner API (Use outside of Scene Graph)
Thanks retrotom, remote testing appears to work, although I'm not actually in front of the TV to check.
Also wondering if GetNowNextPrograms is actually supported, or a typo is involved in the OS/docs.
Also wondering if GetNowNextPrograms is actually supported, or a typo is involved in the OS/docs.
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2016
11:31 AM
Re: RoTuner API (Use outside of Scene Graph)
I'm hoping it's just a typo. I've had to settle for just calling GetPrograms on each channel from the list. While it mostly works for my needs, I'm not confident this is the best route.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2016
01:51 AM
Re: RoTuner API (Use outside of Scene Graph)
"artesea" wrote:
Also wondering if GetNowNextPrograms is actually supported, or a typo is involved in the OS/docs.
Yes :). FWIW:
BrightScript Debugger> pg = createObject("roProgramGuide") : now = createObject("roDateTime")
BrightScript Debugger> ? pg.getNowNextPrograms("2.4", now)
<Component: roArray> =
[
<Component: roAssociativeArray>
<Component: roAssociativeArray>
]
Speaking of which... WTH is roContentMetadata ?!
BrightScript Debugger> ? pg.getNowNextPrograms("2.4", now)[0]
<Component: roAssociativeArray> =
{
category:
content_metadata: <Component: roContentMetadata>
description:
duration: <Component: roDateTime>
format: <Component: roAssociativeArray>
id: 330
name: BUZZR Time Machine
start_time: <Component: roDateTime>
}