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: 
jedashford
Level 7

Video resize appears to be broken after 7.1 udpate

We have a small video view in our onboarding flow that is clickable to expand full screen. It was working perfect during dev with 7.0, but after the upgrade to 7.1, the video boundaries stay at 360x203, but the actual video looks like its playing full screen behind it. Essentially I only see a small portion of the entire 1080p HLS video playing. Additionally often when in the small window its highly distorted with green lines throughout. Anyone else have a smaller-than-fullscreen video acting up and have some ideas?

		<Video
id="fifteenSecondIntro"
width="360"
height="203"
translation="[875,50]" />
0 Kudos
6 Replies
retrotom
Level 7

Re: Video resize appears to be broken after 7.1 udpate

Not sure about Scene Graph, but we had a similar issue. Firmware 7.1 makes video display resolution logic consistent across devices. Beforehand, it was actually inconsistent and matched the resolution of your _application_. So if you were in HD (720p) mode the coordinates and resolution of the video also corresponded to this. After the change, the coordinates and resolution match that of the _display_. So you'll need to translate the video coords, etc to display coords, etc.

Sample code:


app_display_size = GetDisplaySize()
roku_display_size = CreateObject("roDeviceInfo").GetDisplaySize()
x_factor = roku_display_size.w/app_display_size.w
y_factor = roku_display_size.h/app_display_size.h

dst_x = dimensions.X*x_factor
dst_y = dimensions.Y*y_factor
dst_w = dimensions.Width*x_factor
dst_h = dimensions.Height*y_factor

print "SetDest1 (" ; dimensions.X ; "," ; dimensions.Y ; "," ; dimensions.Width ; "," ; dimensions.Height ; ")"
print "SetDest2 (" ; dst_x ; "," ; dst_y ; "," ; dst_w ; "," ; dst_h ; ")"

m.VideoPlayer.SetDestinationRect(dst_x,dst_y,dst_w,dst_h)
0 Kudos
jedashford
Level 7

Re: Video resize appears to be broken after 7.1 udpate

Looks like I only have access to the 'width' and 'height' of the video component in scene graph:

width float 0.0 Sets the width of the video play window in pixels. If set to 0.0 (the default), the video play window is set to the width of the entire display screen.
height float 0.0 Sets the height of the video play window in pixels. If set to 0.0 (the default), the video play window is set to the height of the entire display screen.


Maybe theres a hidden api value for controlling the size of the video vs the 'play window' referenced above? At this point, recreating outside of scene graph isn't an option. I'd just replace it with an image, but this is a poor experience for our Roku users.

From what I'm seeing, there is no way to make a video smaller than full screen using scene graph. This would break or prevent anyone from creating a PIP, which is what I was working on next Smiley Sad Smiley Sad
0 Kudos
retrotom
Level 7

Re: Video resize appears to be broken after 7.1 udpate

Not true. You can create PIP with Scene Graph. You place the video tag in a custom component and then set the resolution on that. Our app has PIP (necessary actually) and we've been toying with Scene Graph for a while. If you put the video tag in a custom component, you can animate its size, opacity, etc.
0 Kudos
jedashford
Level 7

Re: Video resize appears to be broken after 7.1 udpate

@retrotom, are you using firmware 7.1? I have it set up this way and can manipulate the width and height, but that is only the window. The video itself is playing full screen.
0 Kudos
retrotom
Level 7

Re: Video resize appears to be broken after 7.1 udpate

Yes, this is on 7.0 and 7.1. What device are you on? It'd take me a while to do a full inventory, but I can check 10+ roku hardware versions.
0 Kudos
jedashford
Level 7

Re: Video resize appears to be broken after 7.1 udpate

It looks like this may be behavior due to a missing ui_resolutions from the manifest. I added:

ui_resolutions=sd,hd,fhd


and looks to be working now. I missed this somehow in the docs as required for scene graph applications, and that is certainly strange behavior when this is missing.
0 Kudos