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: 
Highlighted
krh5150
Level 7

New Roku 2 roVideoPlayer Zoom

Hi,

Over the weekend, I purchased a Roku 2 and replaced my Roku HD-XR. My channel that was originally on the Roku HD-XR displayed the videos full screen (for standard videos) and wide screen (bars top and bottom). I uploaded my channel to the new Roku 2 and now standard videos are display with large bars on the right and left. Widescreen videos are displayed with large bars all around the video. I'm trying to update my channel to use the roVideoPlayer instead of the roVideoScreen because from what I read, the roVideoPlayer can "zoom". How can I accomplish zooming with the roVideoPlayer?

The Roku is set to 720p (which is the max for my TV) and dimensions 1280x720 (which is the max).

I've tried manually setting the SetDestinationRect for the videoPlayer object and the TargetRect for the ImageCanvas object, but no luck.

Sample code below..

   port = CreateObject("roMessagePort")
canvas = CreateObject("roImageCanvas")
canvas.SetMessagePort(port)
canvas.SetLayer(0, { color: "#00000000", CompositionMode: "Source" })
canvas.Show()
print canvas.GetCanvasRect()
player = CreateObject("roVideoPlayer")
player.SetMessagePort(port)
player.SetDestinationRect(canvas.GetCanvasRect())
player.SetContentList([{
streamQualities: ["HD"]
streamFormat: "mp4"
stream: { url: video.StreamUrls }
}])

player.Play()


Any help would be greatly appeciated! I don't want to see my hard work in coding this channel go to waste.

Thanks,
Kevin
0 Kudos