How do I get detailed logs from the Roku?

旧城冷巷雨未停 提交于 2020-07-24 03:15:05

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!