2

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=0B7BZMWDc5aPQSjB2OGFGb0s2QjQ

Project zip: 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.

Thank you in advance for any suggestions.

kszadkow
  • 41
  • 3
  • What firmware version and what exact Roku model number? (Settings > System > About) You may want to bring this to the dev.forum for attention https://forums.roku.com/viewforum.php?f=34 – Nas Banov Apr 27 '17 at 17:59
  • Hi Nas, we got two identical: 4200X Roku 3, v 7.5.0 build 4099-04 - both behaves identically. Yes I have posted the same question on Roku forum before stackoverflow [link](https://forums.roku.com/viewtopic.php?f=34&t=101434). Thanks. – kszadkow Apr 28 '17 at 13:35

1 Answers1

0

Use Rectangle for overlay with opacity

<Rectangle  id="itemRectangle"  color="0x0a0a0a" opacity = "0.75" />

Don't forget to mention the width and height

Jeswin Rebil
  • 460
  • 1
  • 7
  • 19