I was in the process of developing an app, and everything was working when I last checked it. Today, I gave it another test drive without changing anything, and it’s broken.
The app loads, and attempts to play videos but once the video is loaded it either crashes or it returns me to the selection menu.
My app is a modification of the rss video demo app.
Additonally, connecting to the Roku box through the console no longer works. I do telnet 8080, it connects, and then nothing happens.
As far as the telnet connection goes, the port is 8085.
In terms of troubleshooting, one simple way is to print to the console as much information as possible so that you know where exactly the channel crashes. In videoplayer, you can use msg.getdata(), msg.getmessage(), msg.getindex(), msg.gettype() to output data to the console.
Once you get reconnected, print the output from the console and see if you can figure out where it crashed, what the last line to execute was, and the variable value(s) that may be related to the crash.
“edunn@lifeminute.tv” wrote:
Everything looks ok through the console except I’m getting when I play a video:
"Unexpected event type: 20"
That’s normal. If you read through the documentation for roVideoScreen, type 20 is the isStreamStarted() event. That line gets printed to the console because the sample has no explicit handler for that event and any event without a handler is labeled “unexpected”.
If you look at the event loop in appVideoScreen.brs, you’ll see that the other error is being caused by an isRequestFailed() event. It’s hard to guess what might cause that without knowing more about the particular content that’s failing.
I don’t think I made any changes to appVideoScreen.brs
Function showVideoScreen(episode As Object)
if type(episode) <> "roAssociativeArray" then
print "invalid data passed to showVideoScreen"
return -1
endif
port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)
screen.Show()
screen.SetPositionNotificationPeriod(30)
screen.SetContent(episode)
screen.Show()
'Uncomment his line to dump the contents of the episode to be played
'PrintAA(episode)
while true
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent" then
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
elseif msg.isRequestFailed()
print "Video request failure: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isStatusMessage()
print "Video status: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isButtonPressed()
print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
RegWrite(episode.ContentId, nowpos.toStr())
else
print "Unexpected event type: "; msg.GetType()
end if
else
print "Unexpected message class: "; type(msg)
end if
end while
End Function
---- AA ----
starrating: 90
hdbifurl:
shortdescriptionline2:
shortdescriptionline1: It's National Animal Safety and Protection Month!
contentid:
sdbifurl:
categories: (list of 1)...
List(0)=
sdposterurl: http://lifeminute.tv/sites/default/files/imagecache/roku_sd_poster/images/video/3425/poster/pets4.png
description: One of America ??s favorite pet experts, Steve Dale is on hand with the scoop on the best tips, trends, and must-have advice on proper protection and safety for your beloved four-legged family members.
Sponsored by: Elanco Companion
Animal Health ?
ishd: false
genre:
hdimg: http://lifeminute.tv/sites/default/files/imagecache/roku_sd_poster/images/video/3425/poster/pets4.png
streamformat: mp4
length: 145
contentquality: SD
streamurls: (list of 1)...
List(0)= http://www.lifeminute.tv/video/animalsafetyandprotection.mp4
runtime: 145
synopsis: One of America ??s favorite pet experts, Steve Dale is on hand with the scoop on the best tips, trends, and must-have advice on proper protection and safety for your beloved four-legged family members.
Sponsored by: Elanco Companion
Animal Health ?
streamqualities: (list of 1)...
List(0)= SD
sdimg: http://lifeminute.tv/sites/default/files/imagecache/roku_sd_poster/images/video/3425/poster/pets4.png
streambitrates: (list of 1)...
List(0)= 0
hdposterurl: http://lifeminute.tv/sites/default/files/imagecache/roku_sd_poster/images/video/3425/poster/pets4.png
playstart: 0
title: It's National Animal Safety and Protection Month!
contenttype: episode
hdbranded: false
actors: (list of 1)...
List(0)=
------------
I made no changes… So… that’s cool. Makes me nervous at the inconsistant behavior of the OS, but I’m glad to see the app working again. I just wish v 4.2 build 1006 hadn’t landed the day before my boss came in to review the project.