Hi,
I got the sample player script to successfully play an m3u8 we stream throughout the day. However, I want to switch that stream at a particular time to a second stream.
I have my time method working fine (if the app on the private channel begins within either the 1500 or 1600 hour, stream 2 plays, otherwise stream 1 plays.
And in my event loop, I am checking the time. My debug console shows that the time code fires; however, I do not know how to reinitialize the video player:
Tried this:
date = CreateObject("roDateTime")
showtime = date.getHours()'date.getSeconds()
print "|-o-| ts " + videoclip.StreamUrls + " :: " + Str(date.getHours()) + " : " + Str(date.getMinutes()) + " : " + Str(date.getSeconds())
if showtime = 19 Or showtime = 20 then
'if showtime > 19 And showtime < 30 then
print "It's Showtime!!! " + videoclip.StreamUrls + " :: " + Str(date.getHours()) + " : " + Str(date.getMinutes()) + " : " + Str(date.getSeconds())
if videoclip.StreamUrls = "http://path/to/stream_6@156963/master.m3u" then
player.Stop()
video.Close()
videoclip.StreamUrls = "http://path/to/stream_7@156963/master.m3u"
video.SetContent(videoclip)
video.show()
endif
The roku lives in the office (no tv at home :D), so tomorrow, I will attempt to call the initial method:
date = CreateObject("roDateTime")
showtime = date.getHours()'date.getSeconds()
print "|-o-| ts " + videoclip.StreamUrls + " :: " + Str(date.getHours()) + " : " + Str(date.getMinutes()) + " : " + Str(date.getSeconds())
if showtime = 19 Or showtime = 20 then
'if showtime > 19 And showtime < 30 then
print "It's Showtime!!! " + videoclip.StreamUrls + " :: " + Str(date.getHours()) + " : " + Str(date.getMinutes()) + " : " + Str(date.getSeconds())
if videoclip.StreamUrls = "http://path/to/stream_6@156963/master.m3u" then
player.Stop()
video.Close()
showSpringboardScreen(item)
endif
But if somebody has a better idea, I'll try that, too.
Thanks,
Drew