问题
I currently testing an HLS stream on the simple video player template provided by the roku developer site.
If i'm testing a channel on the roku and my HLS stream is failing, how view and get detailed logs on why its failing?
回答1:
The easiest way I've found to troubleshoot any Roku application is to sideload your content via telnet and print statements out to your console. You can get detailed information from the Roku developer docs about how to enable developer mode on the box, then you can simply telnet in, like so:
telnet [ip address] 8085
At that point, you will see anything you print out from your application. For instance, if you print messages from your video player:
while true
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent" then
if msg.isRequestFailed()
print "Video request failure: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isStatusMessage()
...etc
end if
end if
end while
Alternately, you could set up Google Analytics and report that way if you can't gain access to a device having the problems.
回答2:
Your best bet for determining why an HLS stream is failing is to listen for the roVideoScreenEvent.isRequestFailed() event in your roVideoScreen event loop. If that doesn't give you the information you need, you can add an roSystemLog and enable the "http.connect" and "http.error" events to see if the player is requesting the expected URLs for the stream and/or erroring when requesting those URLs.
来源:https://stackoverflow.com/questions/28202227/how-do-i-get-detailed-logs-from-the-roku