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

contentQuality, HDbranded and ISHd (videoplayer example)

From what I understand the <contentQuality> tag in the xml files of the videoplayer example is obsolete, vestigial, ect.

From reading the SDK documentation, HDBranded True/False determines whether or not the "HD" icon appears on the video screen when HD content is loading and IsHd True/False determines whether or not the "HD" icon appears on the detail screen. Of course, I could be confused about this. However, this is my current problem:
'Set Default screen values for items not in feed
item.HDBranded = true
item.IsHD = true

By default, the videoplayer example has these set to false. When I switched them to true, I get the HD icon when HD content loads, but I also get the HD icon on the detail screen of every video. The true/false boolean for IsHD doesn't seem to have any effect on the detail screen.

Here's my question... a two-parter, actually:
1) How do I get the HD icon to show up on the detail screen only when the content is actually HD?
2) Is there any way possible to get the <contentQuality> tag to act as the IsHD indicator? I realize that the contentQuality tag is a string and IsHD is a boolean, but I'm wondering if there's a way I can just add true or false to the contentQuality tag and have the Roku read that as the IsHD indicator.

Does any of this even make any sense? Thanks in advance, and thanks for being patient with me. I'm new to all this...
If you want a vision of the future, imagine a boot stamping on a human face - forever. - George Orwell
0 Kudos
2 REPLIES 2
destruk
Binge Watcher

Re: contentQuality, HDbranded and ISHd (videoplayer example)

If your video has multiple streams with SD and HD included, then I don't think there is a way to get the exact stream that's playing - it's been on my list of questions for months. If all the streams in the show metadata are SD, or all streams are HD, then it's easy.

With this code, you parse everything but you don't set HDBranded for anything at all in the initial xml parsing routine. So the xml sets the isHD value and ignores HDBranded if it's there.
This way HDBranded is always unset or false, and then you won't see the icon ever on the detail screen.

Function showVideoScreen(episode As Object)
If Type(episode)<>"roAssociativeArray"
Print"invalid data passed to showVideoScreen"
Return -1
End If
port=CreateObject("roMessagePort")
screen=CreateObject("roVideoScreen")
screen.SetMessagePort(port)
screen.SetPositionNotificationPeriod(30)

If episode.isHD=TRUE
episode.HDBranded=TRUE 'sets the HDBranded value so you get the logo on the loading/buffer screen
End If
0 Kudos
Mister_DNA
Visitor

Re: contentQuality, HDbranded and ISHd (videoplayer example)

Thanks for you help. That's going to drive me nuts. I use multiple streams - and about 40% of my content is HD. It would be nice if the icon would show up on the details screen if at least one of the clips in the available streams are HD. As it is, it's either all or nothing. Oh well... Another thing I don't get: I set my display type to Standard Definition, and the HD icon still shows up if I have the HDBranded set to true, yet the Roku knows to grab an SD stream. Go figure.

Thanks again for your help.
If you want a vision of the future, imagine a boot stamping on a human face - forever. - George Orwell
0 Kudos