Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aagna
Level 7

Problems with image

I wrote a small app to display videos and images. When video runs overlay images are displayed. The images I want to display are jpg/png. But sometimes images are not displayed even if the video runs without any problem. When I use teraterm the log shows that images are already displayed. Initially I thought it could be the layer problem. But when I check that too, I found no problem. Images are displayed after the video is started. Can you give me suggestions on this issue. It would be highly appreciated.

Thanks in Advanceaagna

Posts: 1
Joined: Sat Dec 07, 2013 10:37 pm
Private message
0 Kudos
1 REPLY 1\
NewManLiving
Level 8

Re: Problems with image

assuming you are using imagecanvas (no code is provided) so generally an image canvas or an roscreen object displays video as follows:
create the videoplayer object and place it at x,y, width, height pos on your canvas/screen. If you were to play a video as is you would hear it but not see it.
to see it you must create a view layer. this is done by creating a transparent object, (drawing a rectangle transparently will do) at the same x,y, width and height
coordinates of your videoplayer. This now allows you to see the video. The layer that you place your overlay transparency in is now the layer of the videoplayer. now To overlay the videoplayer you must set your subsequent image layers greater than the transparency layer. You know when your video starts playing by responding to status
change messages. At this point you make sure your overlayed images are at layers above the video. Use setlayer, setlayers, swaplayer to force a repaint of your canvas if necessary. Use the
r2d2_bitmap command in your telnet session to review you memory requirements and usage. TO use an roscreen is basically the same. You just replace the imagecanvas
layers with sprite layers in a Z order
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos