"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.
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
player.SetContentList(channelInfo.content_metadata)
player.SetContentList([channelInfo.content_metadata])
"artesea" wrote:
Also wondering if GetNowNextPrograms is actually supported, or a typo is involved in the OS/docs.
BrightScript Debugger> pg = createObject("roProgramGuide") : now = createObject("roDateTime")
BrightScript Debugger> ? pg.getNowNextPrograms("2.4", now)
<Component: roArray> =
[
<Component: roAssociativeArray>
<Component: roAssociativeArray>
]
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>
}
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
Thanks for your patience — we’re excited to share what’s next!