Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
learner
Channel Surfer

back up url

Hi,
I need to have a back up url for the stream
Can any one give me a an idea or eg which shows this?
If url one doesnt work url 2 should play.
2) Can i give 2 play buttons in same screen
I am using video player example
0 Kudos
12 REPLIES 12
MSGreg
Visitor

Re: back up url

I don't think the standard players allow just a simple "alternate URL" to be specified.

What you could do is add another button to the roSpringBoardScreen (aka details screen) that says "Play Alternate Stream"
then call the video player with a Content Meta-Data that reflects the alternate stream.
0 Kudos
bandal
Visitor

Re: back up url

Can't we have the .brs file call a php file that determines which server is up? Better that rezipping and updating the Channel.
0 Kudos
RokuJoel
Binge Watcher

Re: back up url

It is pretty easy to try a second URL for the stream if it fails to playback, I think
if msg.ispartialresult()
is the event you would use to trigger that.

- Joel
0 Kudos
bandal
Visitor

Re: back up url

Do you have a better example of how to code this as I use xml for my feeds? If stream1 fails, how would it get to stream2? I use videoplayer.

Or is there a way to switch servers if server1 is down and allow server2 to take over as a mirror site?

Thanks,
DA
0 Kudos
RokuMarkn
Visitor

Re: back up url

What video format are you using? HLS has this functionality built in -- you just specify multiple top level playlists with the same bitrate. For other formats you'd need to use one of the other suggestions in this thread, like querying a URL to ask which server to use.

--Mark
0 Kudos
SkipFire
Visitor

Re: back up url

You could do something with the HTTP object, if you get a valid response then you put URL1 into the meta-data for the feed, if you don't then you put URL2 into the meta-data for your feed.
0 Kudos
destruk
Streaming Star

Re: back up url

"SkipFire" wrote:
You could do something with the HTTP object, if you get a valid response then you put URL1 into the meta-data for the feed, if you don't then you put URL2 into the meta-data for your feed.


That sounds like the best way to do it - since "ispartialresult" would show up whenever a user stopped a video manually.
0 Kudos
TheEndless
Channel Surfer

Re: back up url

"destruk" wrote:
"SkipFire" wrote:
You could do something with the HTTP object, if you get a valid response then you put URL1 into the meta-data for the feed, if you don't then you put URL2 into the meta-data for your feed.

That sounds like the best way to do it - since "ispartialresult" would show up whenever a user stopped a video manually.

I think IsRequestFailed() would be the more appropriate event to listen for. If there's no video, you'd never get a partial result.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
bandal
Visitor

Re: back up url

Thanks for the input. I will try the suggestions and my content will be HLS.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.