RokuJoel
"RokuJoel" wrote:
Assuming you are using the roPosterScreen for your channel, you would include as part of the posters representing each media item something that lets you know if it is audio or video. Conditionally based on that, you would launch a function to play audio, or launch a function to play video.
Rough example:
sub main()
poster=createobject("roposterscreen")
poster.setliststyle("flat-category")
content=[{shortdescriptionline1:"audio item"
streamurl:"http://www.myserver.com/my.mp3"
streamformat:"mp3"
action:"playAudio"}
{shortdescriptionline1:"video item"
streamformat:"mp4"
action:"playVideo"
video:[{url:"http://www.myserver.com/my.video.mp4",qualities:"SD",streamformat:"mp4",title:"STUFF",bitrate:"500"}]}]
poster.setcontentlist(content)
port=createobject("romessageport")
poster.setmessageport(port)
poster.show()
while true
msg=wait(0,port)
if type(msg)="roPosterScreenEvent" then
if msg.Islistitemselected() then
ndx=msg.getindex()
if content[ndx].Action="playVideo" then
playvideo(content[ndx])
else if content[ndx].Action="playAudio" then
playaudio(content[ndx])
end if
end if
end if
end while
end sub
function playaudio(audio as object)
?"this is where your audio player goes"
end function
function playvideo(video as object)
?"this is where your video player goes"
end function
I have tried this on the videoplayer,but it is not going to my categories screen.
Would this be better placed under the homescreen as a special category and called from there.This example works from the simple player and custom player. but not from the videoplayer SDK.
relevant postings are
viewtopic.php?f=34&t=38074&start=0&hilit=video+playerviewtopic.php?f=34&t=39414&start=0viewtopic.php?f=34&t=33396&start=0Where this approach was attempted but I look at the NEWSCASTER channel(fox in particular) where the audio and video app
was done,but the radio does not play.Is this at all possible to have both audio and video in category leaf?
I am completing my channel for submission and do not want to waste time if it is not.In the meantime I have created a private channel for audio to play the radio.
Channel: Goaheadmission
O/S : Linux
Home media: MYTHROKUPLAYER With Homerun