krh5150
Visitor

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
Tags (1)
0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!