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
If you can report the issue to email@example.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.
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.
if you need further help join me at skype: firstname.lastname@example.org 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
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.