So I've gotten HLS to work with my roku box, and have figured out how to write and encode it using the XML file. But i'm trying to write an if statement to detect when the HLS stream is offline with something like isStreamStarted() or perhaps with isRequestFailed() so something like:
if isRequestFailed() = -5
print "The stream is currently offline"
end if
Would this work? If so, where and which Source file would you recommend this being placed?
We're using the video player template for our channel.
When i'm connected to the debugging console - and I click on one of the offline HLS streams it gives me the output of
"ButtonPressed
showHomeScreen | msg = ConnectionContext failure | index = 0
Video status: 0 0
showHomeScreen | msg = Unspecified or invalid track path/url. | index = 0
Video status: 0 0
showHomeScreen | msg = | index = -5
Video request failure: -5 1
showHomeScreen | msg = | index = 0
Screen closed"
If you need to see the code, I can post that as well, but I haven't made many changes from the original Video player template.