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
ajaypaudel
Level 7

Roku channel to support all the display type

Hello,
We have made a roku channel and we want thet channel to support all the size like 360p, 720p, 1080p, 2160p but now the channel is compatable for 720p only. So can anyone suggest us how to make a channel to support any screen size i.e 360p, 720p, 1080p, 2160p
0 Kudos
6 Replies
destruk
Level 10

Re: Roku channel to support all the display type

In the manifest file, put hd for resolution and it will auto-scale to what is being used.
ui_resolutions=hd
0 Kudos
ajaypaudel
Level 7

Re: Roku channel to support all the display type

"destruk" wrote:
In the manifest file, put hd for resolution and it will auto-scale to what is being used.
ui_resolutions=hd

We have place that also but also in roku ultra box with 1080p and for more resolution there is issue what can it be i wonder 
0 Kudos
destruk
Level 10

Re: Roku channel to support all the display type

If you can report the issue to partnersuccess@roku.com perhaps the engineers can look at it - all things 'should' be scaled with that single resolution listed in the manifest.  But some things, depending on roku model, are not scaled correctly.
0 Kudos
speechles
Level 9

Re: Roku channel to support all the display type

ui_resolutions=fhd

Use the above.
The only time a true 1080P UI will be available is if the user has a 4K television with a 4K Roku device.
Everybody else will get a 720P UI.

The UI will scale. Always build in 1080P with FHD. Let the Roku natively downscale. It doesn't upscale correctly.
Avoid odd numbers in your translations, heights, widths, etc.. Odd numbers don't scale correctly.

As far as playing video it has absolutely nothing to do with ui_resolution. Video does upscale and downscale according to display type.
0 Kudos

Re: Roku channel to support all the display type

if you need further help join me at skype: jitendragaur1009@outlook.com
You have to do the scaling of each XML translation at .brs file after that your issue will resolve 
ui_resolutions=hd

function scale(fromVal = 1 as Integer) as Dynamic
dInfo = CreateObject("roDeviceInfo")
mode = getDisplayMode()
if mode = "FHD" then
return (fromVal)
else if mode = "HD" then 'FHD->HD:720/1080'
return (fromVal)
else if mode = "SD" then 'FHD->SD:480/1080'
return (fromVal * 0.44444)
end if
end function

function getDisplayMode() as String
gaa = getGlobalAA()
if gaa.displayMode = Invalid then
    deviceinfo = CreateObject("roDeviceInfo")
    displaySize = deviceinfo.getDisplaySize()
    if displaySize.h = 1080
        gaa.displayMode = "FHD"
    else if displaySize.h = 720
        gaa.displayMode = "HD"
    else if displaySize.h = 480
        gaa.displayMode = "SD"
    end if
    return gaa.displayMode
else
return gaa.displayMode
end if
end function

 m.contentList=m.top.findNode("contentList")
 m.contentList.rowLabelFont=m.rowlabelfont
 m.contentList.rowLabelColor="#000000"
 m.contentList.translation=[scale(40),scale(360)]
 m.contentList.itemSize=[scale(1250),scale(270)]
 m.contentList.numRows=scale(10)
 m.contentList.itemSpacing=[scale(10),scale(20)]
 m.contentList.focusXOffset=[scale(0)]
 m.contentList.rowItemSize=[[scale(168),scale(236)]]
 m.contentList.rowItemSpacing=[[scale(20),scale(0)]]
 m.contentList.rowLabelOffset=[[scale(5),scale(2)]]
0 Kudos
speechles
Level 9

Re: Roku channel to support all the display type

You can use a group around your things you want scaled in the XML:
<Group id="ScaleGroup>
   ... stuff goes here ...
</Group>

Then in the BRS:
m.scaleGroup = m.top.findNode("ScaleGroup")
m.scaleGroup.scaleRotateCenter = [ m.Xcenter, m.Ycenter ]

Then everything in the group is scaled and you don't have to do literally every single thing. Plus that scale() just eats clock cycles (read as it is slow)... and in the render thread no less. You shouldn't repeatedly call that function in the render thread like that. It is just poor practice. Clearly a hack. You had to write your own subroutine to do it. Roku has a method to do this internally. A fast one. One you do barely nothing and it just works.

Also Isn't that tedious doing all those scale() too adding them? Not to mention the time to add them but the bytes that take up too. Every single "scale()" is 7 bytes. Compiled it isn't 0. So it costs more as far as footprint of the code.

It is far easier with a group and it comes with no penalties or hogging of the render thread.

But It all depends on what floats your boat. Water. But some use Milk. Others use Chocolate Milk. Etc..

It is easier to use a single group and then center/scale the group. Then it automagically will scale everything inside as part of the group. But it is all up to you.
0 Kudos