Function Main()
showVideoScreen(CreateObject("roAssociativeArray"))
End Function
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")
episode.HDBranded = false
episode.IsHD = false
episode.Stream = { url:"http://www.useducationtv.com/Mobile.aspx?action=video&videoId=64e7249efa8f4e7b90a3f2f63754be5e",
bitrate:2000
quality:false
contentid:"mycontent-2000"
}
'episode.StreamFormat: "mp4"
screen.SetContent(episode)
screen.SetMessagePort(port)
screen.Show()
while true
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent" then
print "showVideoScreen | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
else if msg.isStatusMessage()
print "status message: "; msg.GetMessage()
else if msg.isPlaybackPosition()
print "playback position: "; msg.GetIndex()
else if msg.isFullResult()
print "playback completed"
exit while
else if msg.isPartialResult()
print "playback interrupted"
exit while
else if msg.isRequestFailed()
print "request failed – error: "; msg.GetIndex();" – "; msg.GetMessage()
exit while
end if
end if
end while
End Function
showVideoScreen | msg = An unexpected problem (but not server timeout or HTTP error) has been detected. | index = -3
request failed error: -3 An unexpected problem (but not server timeout or HTTP error) has been detected.
"RokuMarkn" wrote:
Redirects shouldn't cause any problem, the Roku should just follow the redirect. You could try passing the redirected URL to the player to rule out any problem with redirects.
--Mark
example
https://delve-protected.s3.amazonaws.co ... TJmzP7g%3D
[ url will expire shortly ]