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

XML playlist

I'm trying to build an app which lets users choose videos from a list to create a XML playlist which would then loop. 

I want to have Roku read the playlist as a subcategory.xml file like this:

<feed>
<resultLength>3</resultLength>
<endIndex>3</endIndex>
<item sdImg="http://foo.com/images/custom.png" hdImg="http://foo.com/images/custom.png">
<title>Custom</title>
<contentId>10101</contentId>
<contentType>Talk</contentType>
<contentQuality>HD</contentQuality>
<streamFormat>mp4</streamFormat>
<media>
   <streamQuality>HD</streamQuality>
   <streamBitrate>2000</streamBitrate>
   <streamUrl>http://foo.com/content/foo1.mp4</streamUrl>
</media>
<synopsis>
A Custom Playlist
</synopsis>
<genres>custom</genres>
<runtime>572</runtime>
</item>
<item "a different playlist or another media item in the first playlist" ></item>
<item "a different playlist or another media item in the first playlist" ></item>
</feed>


Is it possible to add more <media> entries in the <item>? If I do that, it only plays the last <media> entry.

Or would I set something in a .brs file to read each <item> sequentially?

Thanks!
0 Kudos
2 REPLIES 2
joetesta
Roku Guru

Re: XML playlist

yes those media entries would be useful if you have multiple streams of the same item encoded at different bitrates.

You are correct you'd need multiple items and the brs code to parse and handle them.
aspiring
0 Kudos
destruk
Streaming Star

Re: XML playlist

If you encode with mpeg-dash then all of that is in the manifest and you can still give roku a single link to the manifest file (one for x264 and a second link for x265)
One thing about progressive MP4s is we recently learned the links provided MUST be from lowest bitrate to highest bitrate.
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.