diff --git a/components/Player.brs b/components/Player.brs
index e1eb65e..2a22701 100644
--- a/components/Player.brs
+++ b/components/Player.brs
@@ -9,7 +9,7 @@
' Player
sub init()
- m.video = m.top.CreateChild("Video")
+ m.video = m.top.findNode("VideoNode")
end sub
sub controlChanged()
diff --git a/components/Player.xml b/components/Player.xml
index 085c0fe..0efe222 100644
--- a/components/Player.xml
+++ b/components/Player.xml
@@ -13,5 +13,11 @@
<field id="control" type="string" alwaysNotify="true" onChange="controlChanged"/>
</interface>
+ <children>
+ <Rectangle id="VideoViewPort" width="480" height="270" translation="[100,100]" clippingRect="[0,0,480,270]">
+ <Video id="VideoNode" width="480" height="270"/>
+ </Rectangle>
+ </children>
+
<script type="text/brightscript" uri="pkg:/components/Player.brs" />
</component>
RokuNB, see the small diff above to make the videoNode a child of a rectangle. The ad will now play based on the translation, but it doesn't inherit the width/height. I added clippingRect after the fact just to see it sized properly, but that just clips it. I noticed that the boundingRect is still 1280x720. Is there a key to changing the bounding rect that's separate from setting the width/height?
Here is a quick log from RAF renderer during playback, note the bounding rect.
rafrndr-renderTypeChanged() - client-inserted
added child: Rectangle id: 1 subtype: Rectangle
parent bounding rect: x: 100 y: 100 w: 1280 h: 721
Forgot to include the "view" boundingRect. This is the view being passed to showAds, and it indicates the width/height are set correctly.
?view.boundingrect()
<Component: roAssociativeArray> =
{
height: 270
width: 480
x: 100
y: 100
}