"RokuKevin" wrote:
Content developers can implement something similar on the Roku using the ECP. The External Control Protocol allows you to launch a channel on the Roku passing it any parameters you wish. These parameters can include the stream urls to instantly play on the Roku.
I've been try to find the example in the sdk of this, and haven't been able to locate it. In the ECP Guide pdf of the 2.8 SDK, I see the following:
launch takes an app id as an argument and a list of url parameters that are sent to the app id as an roAssociativeArray passed the the RunUserInterface() or Main() entry point. This command is sent with an http url only POST.
and
After keeping the “Netflix” program highlighted for five seconds, the program launches the simplevideoplayer application with url and streamformat as keys in the roAssociativeArray passed to the Main() entry point.
The simplevideoplayer application immediately launches the roVideoScreen when it is launched with an roAssociativeArray containing valid url and streamformat keys.
And the main sub of the simplevideoplayer example source:
Sub Main()
'initialize theme attributes like titles, logos and overhang color
initTheme()
'display a fake screen while the real one initializes. this screen
'has to live for the duration of the whole app to prevent flashing
'back to the roku home screen.
screenFacade = CreateObject("roPosterScreen")
screenFacade.show()
itemMpeg4 = { ContentType:"episode"
SDPosterUrl:"file://pkg:/images/DanGilbert.jpg"
HDPosterUrl:"file://pkg:/images/DanGilbert.jpg"
IsHD:False
HDBranded:False
ShortDescriptionLine1:"Dan Gilbert asks, Why are we happy?"
ShortDescriptionLine2:""
Description:"Harvard psychologist Dan Gilbert says our beliefs about what will make us happy are often wrong -- a premise he supports with intriguing research, and explains in his accessible and unexpectedly funny book, Stumbling on Happiness."
Rating:"NR"
StarRating:"80"
Length:1280
Categories:["Technology","Talk"]
Title:"Dan Gilbert asks, Why are we happy?"
}
itemVenter = { ContentType:"episode"
SDPosterUrl:"file://pkg:/images/CraigVenter-2008.jpg"
HDPosterUrl:"file://pkg:/images/CraigVenter-2008.jpg"
IsHD:False
HDBranded:False
ShortDescriptionLine1:"Can we create new life out of our digital universe?"
ShortDescriptionLine2:""
Description:"He walks the TED2008 audience through his latest research into fourth-generation fuels -- biologically created fuels with CO2 as their feedstock. His talk covers the details of creating brand-new chromosomes using digital technology, the reasons why we would want to do this, and the bioethics of synthetic life. A fascinating Q&A with TED's Chris Anderson follows."
Rating:"NR"
StarRating:"80"
Length:1972
Categories:["Technology","Talk"]
Title:"Craig Venter asks, Can we create new life out of our digital universe?"
}
item = { ContentType:"episode"
SDPosterUrl:"file://pkg:/images/BigBuckBunny.jpg"
HDPosterUrl:"file://pkg:/images/BigBuckBunny.jpg"
IsHD:true
HDBranded:true
ShortDescriptionLine1:"Big Buck Bunny"
ShortDescriptionLine2:""
Description:"Big Buck Bunny is being served using a Wowza server running on Amazon EC2 cloud services. The video is transported via HLS HTTP Live Streaming. A team of small artists from the Blender community produced this open source content..."
Rating:"NR"
StarRating:"80"
Length:600
Categories:["Technology","Cartoon"]
Title:"Big Buck Bunny"
}
showSpringboardScreen(itemVenter)
'showSpringboardScreen(itemMpeg4) 'uncomment this line and comment out the next to see the old mpeg4 example
'showSpringboardScreen(item) 'uncomment this line to see the BigBuckBunny example
'exit the app gently so that the screen doesn't flash to black
screenFacade.showMessage("")
sleep(25)
End Sub
I'm not very fluent in BrightScript yet, but what I would expect to see is a roAssociativeArray passed in as a parameter something like:
sub Main(launchParams as roAssociativeArray)
and then code to check the items of the array for streamformat and url and act on that data, if found, before showing the SpringboardScreen and/or screenFacade. I've looked at videoplayer and customvideoplayer as well. Can you point out an example in the sdk or provide a quick one?
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com