Chris,
i got this "somehwhat" working....
here is my code, using the videoplayer example appVideoScreen.brs
Function showVideoScreen(episode As Object)
if type(episode) <> "roAssociativeArray" then
print "invalid data passed to showVideoScreen"
return -1
endif
url = "http://xxx.com/get/IptvMyWay-670.m4v"
fmt = "mp4"
url2 = episode.StreamUrls
fmt2 = episode.StreamFormat
print " this is the url: ";url2
print " this is the Format: ";fmt2
videoArray = [
{
Stream: { url: url }
StreamFormat: fmt
},
{
Stream: { url: url }
StreamFormat: fmt
}
]
for each video in videoArray
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(CreateObject("roMessagePort"))
screen.SetPositionNotificationPeriod(30)
screen.SetContent(video)
screen.Show()
'Uncomment his line to dump the contents of the episode to be played
'PrintAA(episode)
while true
msg = wait(0, screen.GetMessagePort())
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
next
End Function
ok this code above works. BUT not the correct way.
the
url2 and
fmt2 when printed show the correct format and url.... but they will not play just goes back to the springboard screen....
the error i get is:
this is the url: http://xxxx.com/get/IptvMyWay-95.m4v
this is the Format: mp4
showHomeScreen | msg = An unexpected problem (but not server timeout or HTTP err
or) has been detected. | index = -3
Video request failure: -3 0
showHomeScreen | msg = | index = 0
Screen closed
what i don't understand is it does print out as the correct URL and Format, but it just poops out this error.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway