Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
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
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.