msg=wait(0,port)
?"type: ";msg.gettype();" data: ";msg.getdata();" message: ";msg.getmessage();" index: ";msg.getindex()
"Unexpected event type: 20"
"showHomeScreen | msg= An unexpected problem (but not server timeout or HTTP error) has been detected. | index = -3
Video request failure: -3 0
"edunn@lifeminute.tv" wrote:
Everything looks ok through the console except I'm getting when I play a video:"Unexpected event type: 20"
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
'Uncomment his line to dump the contents of the episode to be played
'PrintAA(episode)
---- 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)=
------------