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

Dynamically Set Poster Screens - How?

Hello,
I am slowly putting together a sample app using the provided VIDEOPLAYER source.

My question is, how do I dynamically change the poster display based on what content is selected?

For example.

Say I have three categories from my home page..
Television | Comedies | Documentaries

Now, I would like to drill into the category Television and have the Poster Screen Change as approriate.

For Example (Selected[PosterScreenType])..
Television[flat-category]>Sitcoms[flat-category]>All In the Family[arced-portrait]>Season2[flat-episodic]

Now Selecting COMEDIES From the home page may present a diffent set of poster screens as drilled down.

So the question is, how, using the VideoPlayer example, can I change the poster screens based on content type. Examples?
Ideally I would just be able to flag inside the XML feed what type of poster screen should be displayed for any given feed type.
But, I must have missed something because I dont understand how to change it.

Any help in the right direction is greatly appreciated.

Thanks
Banta
0 Kudos
5 REPLIES 5
RokuKevin
Visitor

Re: Dynamically Set Poster Screens - How?

You can make these changes by pointing to xml feeds on your own server. The only brightscript change necessary is to change the urls of the xml feeds that you will modify.

Then just edit the xml feeds to change the category labels and content for your posters.

--Kevin
0 Kudos
Banta67
Visitor

Re: Dynamically Set Poster Screens - How?

Ah that is music to my ears! And soon to my eyes. I was hoping that this is something that could be specified in the XML.

Looking at the first record of a supplied XML example (creativity.xml), there is the following,,,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>3</resultLength>
<!-- endIndix indicates the number of results for this *paged* section of the feed -->
<endIndex>3</endIndex>
<item sdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg" hdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg">
<title>Elizabeth Gilbert on nurturing creativity</title>
<contentId>10051</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamFormat>mp4</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://video.ted.com/talks/podcast/ElizabethGilbert_2009_480.mp4</streamUrl>
</media>
<synopsis>Elizabeth Gilbert muses on the impossible things we expect from artists and geniuses -- and shares the radical idea that, instead of the rare person 'being' a genius, all of us 'have' a genius. It's a funny, personal and surprisingly moving talk.</synopsis>
<genres>Creativity</genres>
<runtime>1172</runtime>
</item>

How would I modify code to show different poster types?(Flat Category, Arced Landscape, ETC)?
Please provide a quick example.

Is there a document or cheatsheet that shows all of the parameters that I can modify through the XML input?
Thank you so much!
Banta
0 Kudos
nowhereman
Visitor

Re: Dynamically Set Poster Screens - How?

"Banta67" wrote:
Ah that is music to my ears! And soon to my eyes. I was hoping that this is something that could be specified in the XML.

Looking at the first record of a supplied XML example (creativity.xml), there is the following,,,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>3</resultLength>
<!-- endIndix indicates the number of results for this *paged* section of the feed -->
<endIndex>3</endIndex>
<item sdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg" hdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg">
<title>Elizabeth Gilbert on nurturing creativity</title>
<contentId>10051</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamFormat>mp4</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://video.ted.com/talks/podcast/ElizabethGilbert_2009_480.mp4</streamUrl>
</media>
<synopsis>Elizabeth Gilbert muses on the impossible things we expect from artists and geniuses -- and shares the radical idea that, instead of the rare person 'being' a genius, all of us 'have' a genius. It's a funny, personal and surprisingly moving talk.</synopsis>
<genres>Creativity</genres>
<runtime>1172</runtime>
</item>

How would I modify code to show different poster types?(Flat Category, Arced Landscape, ETC)?
Please provide a quick example.

Is there a document or cheatsheet that shows all of the parameters that I can modify through the XML input?
Thank you so much!
Banta


The XML does not directly control the interface. If you look through the videoplayer example, there is code that parses that XML and maps it into the content-meta-data structure for the poster screen. That code is in ShowFeed.brs and CategoryFeed.brs. However, I do not believe display-type is one of the attributes it maps. You would need to add that code.
twitter:nowhereman
http://www.thenowhereman.com/roku
http://www.thenowhereman.com/netflix
0 Kudos
Banta67
Visitor

Re: Dynamically Set Poster Screens - How?

Thanks for the reply.
I'm affraid that RokuKevin was perhaps not understanding what I was trying to do.

I am wondering if the screenstyle can be changed on the fly when loading the xml?

I am looking to update the page value...
screen.SetListStyle("arced-landscape")

which is currently on line 23 of the file appPosterScreen.brs.

So what I am thinking is I would have something like....

<item sdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg" hdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg" liststyle="flat-episodic">

or...

<category title="Technology" description="TED Talks on Technology" sd_img="http://rokudev.roku.com/rokudev/examples/videoplayer/images/TED_Technology.png" hd_img="http://rokudev.roku.com/rokudev/examples/videoplayer/images/TED_Technology.png">
<categoryLeaf title="The Mind" description="" feed="http://rokudev.roku.com/rokudev/examples/videoplayer/xml/themind.xml" liststyle="flat-episodic"/>
<categoryLeaf title="Global Issues" description="" feed="http://rokudev.roku.com/rokudev/examples/videoplayer/xml/globalissues.xml" liststyle="flat-landscape" /> </category>


then in appPosterScreen.brs, do something like.....

screen.SetListStyle(liststyle);

Do you think this is on the right track? What else would I need to change here. Please bear with me as I am new to all of this.
Any additional help or tips you can give is appreciated.
Thanks
Banta :roll:
0 Kudos
RokuKevin
Visitor

Re: Dynamically Set Poster Screens - How?

Sorry i did misunderstand you.

The videoplayer app does not currently support setting the list style in the xml. If you wanted to do that, you'd have to modify the script to parse the list style out of the xml as well and set it for the poster screens.

The videoplayer app just gets the content for the poster (which categories to display... which movie content to display.... etc...) from the xml.

--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.