Hi, I am trying to understanding how to get roScreen and rovideoPlayer work . I manage to get a video played however, its not displaying in the screen. i can hear the audio but not video. it appears its running on the background.
Could someone please help me how to get the video displayed! . Thanks a bunch.
I am calling this function from roSpringboardScreen screen when "play button is pressed"
p = CreateObject("roMessagePort") screen=createobject("roscreen",true,1280, 720)
'screen.drawobject(obj1.posx,obj1.posy,player) screen.SwapBuffers() ' fontReg = CreateObject("roFontRegistry") ' font = fontReg.GetDefaultFont() ' screen.DrawText("Hello world....", 100, 100, &hFF00FF00, font) 'screen.SwapBuffers() ' screen.Finish() while true 'msg = wait(0, canvas.GetMessagePort()) msg=player.GetMessagePort().getmessage() 'print "msg.....";msg if type(msg) = "roVideoPlayerEvent" if msg.isFullResult() exit while else if msg.isPartialResult() exit while else if msg.isRequestFailed() print "isRequestFailed" exit while else if msg.isStatusMessage() if msg.GetMessage() = "start of play" print ""start of play""
end if else if msg.isPlaybackPosition() print "isPlaybackPosition: " + msg.GetIndex().ToStr()
"NewManLiving" wrote: Not well documented but you need to draw a transparent Rectangle around the dimensions of your Videoplayer. Called punching a hole or a portal
Hm, yeah. I remember reading somewhere about the video and graphics planes - but alas i cannot find it in the RTFM. I find this in an earlier thread and seems to me so insightful, i'll quote it here for posterity:
"RokuMarkn" wrote: The video plane is "below" (lower z-order) than the graphics plane. This is a feature of the hardware in all products. [...] The only reason it looks like it's in front of graphics is because it's showing through the transparent hole you've punched in the graphics plane.
An roScreen and everything that's drawn to it, either directly or via roCompositor, is drawn on the graphics plane. [...] In fact all screen types except the video player (with the complicated exception of roGridScreen) are drawn to the graphics plane. The only reason video is ever visible is when there is transparency in the graphics plane to reveal part or all of the video plane. This is why video display works the way it does.