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
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.
Can’t we have the .brs file call a php file that determines which server is up? Better that rezipping and updating the Channel.
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
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
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
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.
“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.
“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.
Thanks for the input. I will try the suggestions and my content will be HLS.
“TheEndless” wrote:
I think IsRequestFailed() would be the more appropriate event to listen for.
Yes, isrequestfailed() would be the correct event to listen for, my bad.
- Joel
? :oops:
It doesn’t matter which BRS file a function goes in but you would put whatever code you write into your video playback function, probably that is in appVideoPlayer.brs or something similar depending on what example you are basing your channel.
- Joel
