Dear fellow members,
I have a big problem ahead of me.
Please refer to the following sample code (I typed some code so there can be spelling mistakes, sorry for that)
Function playVideo()
movieScreen = CreateObject("roVideoScreen")
movie = CreateObject("roAssociativeArray")
port = CreateObject("roMessagePort")
movie.Stream = {
url:"http://video.ted.com/talks/podcast/JeffHan_2006_480.mp4",
bitrate:639,
quality:false
}
movie.StreamFormat = "mp4"
movieScreen.SetContent(movie)
movieScreen.SetMessagePort(port)
movieScreen.Show()
while (true)
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent" then
if msg.isScreenClosed()
exit while
else if msg.isStatusMessage()
else if msg.isPlaybackPosition()
else if msg.isFullResult()
exit while
else if msg.isPartialResult()
exit while
else if msg.isRequestFailed()
exit while
end if
end if
end while
return true
End Function
Function Main()
screen = CreateObject("roScreen")
screen.DrawLine(1,1,100,100,&hFF0000FF)
screen.SwapBuffers()
sleep(1000)
playVideo()
screen.DrawLine(500,1,100,100,&h00FF00FF)
screen.SwapBuffers()
sleep(1000)
return true
End Function
When I run this,
1. First a red line displays
2. Video plays properly. In the middle of video I press the <- button so video get interuppted and get out of the playVideo() function
3. I am expecting to see a green line on the screen but nothing get displayed. (For debugging,I defined another roScreen after the playVideo() function call and then the green line got displayed. But I need to use the original roScreen object.)
I would like to know what I am missing. Thank you very much for your help
Chandana