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: 
cpjamloki
Visitor

SetDestinationRect for SD mode

i have set below position for HD in rovideoplayer in imagecanvas, which is fitting best.

player.SetDestinationRect(x:656,y:149,w:576,h:324)

but in SD mode it's not fitted. so please help me for findout it's SD position..

and how to calculate SetDestinationRect according to screen?
0 Kudos
3 REPLIES 3
RokuMarkn
Visitor

Re: SetDestinationRect for SD mode

roDeviceInfo.GetDisplayMode() tells you whether the display is in 720p or 480i. Is that what you're asking?

--Mark
0 Kudos
cpjamloki
Visitor

Re: SetDestinationRect for SD mode

i have set for SD version. mean i know it's 480i.

if my HD position is player.SetDestinationRect(x:656,y:149,w:576,h:324) . then what should be position for SD as set for HD.

i mean if "w:576,h:324" for HD
then what should be for SD w=? h=?

because i am not understanding how it's adjusting according to screen(HD/SD).

please suggest me how to give width and height position corrosponding to each other, when i am changing one position(whether it is w or h) it's affected both (w , h).
0 Kudos
destruk
Streaming Star

Re: SetDestinationRect for SD mode

640x480 to 1280x720 is a 200% x 150% proportion
So if you have w:576,h:324 for SD then that should be 1152,486 for HD/720p - it is a little more complicated if you want relative positioning/centering, or other considerations involved in the finished position.

For HD to SD -- with w:576,h:324 -- it'd be w:288, h:216 for SD
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.