Roku Developer Program

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

problem with transparent video overlay

Hi All 

I hit quite a big problem trying to overlay a transparent PNG onto video node. It looks like transparency is not applied correctly and the white transparent image makes video darker. 

Screen grab - video is a white 30 seconds clip. Top rectangles are black with different transparency level the bottom ones are white and from some reason are visible as grey. 
https://drive.google.com/open?id=0B7BZMWDc5aPQcGxlQVhfbE1sWDg

Can anyone advice, what is going on here? Is the "Poster" object can be used as an overlay? 

<component name = "VideoExample" extends = "Scene"   >
 <script type = "text/brightscript" >
   <![CDATA[
     sub init()
       videocontent = createObject("RoSGNode", "ContentNode")
       videocontent.title = "Example Video"
       videocontent.streamformat = "mp4"
       videocontent.url = "pkg:/images/white.mp4"
       video = m.top.findNode("videoNode")
       video.content = videocontent
       video.setFocus(true)
       video.control = "play"
     end sub
   ]]>
 </script>
 <children >
   <Video id="videoNode" width="1280" height="720" loop="true">
     <Poster id="overlayNode" uri="pkg:/images/gradient.png"/>
   </Video>
 </children>
</component>


In previous version of Brightscript we were using: "roImageCanvas" which is deprecated and looks like "Poster" is the only replacement. Isn't it?
BTW transparency is incorrect only when overlay-ed on the video node - the same PNG overlay-ed on white "Poster" background behaves as expected and bottom row of rectangles is not visible.  

   <Poster id="overlayNode" uri="pkg:/images/white.png">
     <Poster id="overlayNode" uri="pkg:/images/gradient.png"/>
   </Poster>



Thank you in advance for any suggestions. 


  
0 Kudos
1 Reply
Roku Employee
Roku Employee

Re: problem with transparent video overlay

Trackback from http://stackoverflow.com/questions/43630919
"kszadkow" wrote:
[...] we got two identical: 4200X Roku 3, v 7.5.0 build 4099-04 - both behaves identically

Note the "sunsetting" timetable at https://blog.roku.com/developer/2017/02/01/legacy-sdk/
roImageCanvas is not disappearing soon, albeit after July '17 you won't be able to publish new apps using it and after Jan '18 no app updates using it will be accepted. The plan is to vanish it Jan '19.
0 Kudos