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

mrss feed hls

Hello. I am using a modified version of the mrss template. I am trying to get the hls stream to play but it keeps erroring out.

in my nwm_mrss.brs file have i have this code snippet


' streamFormat
if item.enclosure.count() > 0
for each enclosure in item.enclosure

if item.enclosure@type = "video/hls"
fileFormat = "hls"
else if item.enclosure@type = "video/x-mp4"
fileFormat = "mp4"
else if item.enclosure@type = "video/mp4"
fileFormat = "mp4"
else if fileFormat = ""
end if

newItem.streamFormat = fileFormat
end for
end if



here is the debug error

showHomeScreen | msg = An unexpected problem (but not server timeout or HTTP error) has been detected. | index = -3
Video request failure: -3 0
showHomeScreen | msg = | index = 0
Screen closed

Any help is appreciated.

Thanks
0 Kudos
5 REPLIES 5
RokuChris
Roku Employee
Roku Employee

Re: mrss feed hls

First step, make sure your content-meta-data structure is being populated with what you intend. There's a line in appVideoScreen.brs that you can un-comment to dump the structure to the console and examine it.

  'Uncomment his line to dump the contents of the episode to be played
'PrintAA(episode)
0 Kudos
uarlive
Visitor

Re: mrss feed hls

Thanks. I will look into that. I know the url worked using the video player template.
0 Kudos
agmark
Visitor

Re: mrss feed hls

I'm wondering if this matches the type you have in the url?
if item.enclosure@type = "video/hls"
You could try changing your if statement so it defaults to "hls". The streamformat is one of the few mandatory parameters needed to play successfully, so that's the first place to look. Definately uncomment like Chris said. Gotta see the big picture 🙂
0 Kudos
uarlive
Visitor

Re: mrss feed hls

thanks. looking into that now. here are the contents of the m3u8 file.

#EXTM3U
#EXT-X-VERSION:2
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=522183,CODECS="avc1.66.31, mp4a.40.34",RESOLUTION=640x360
0 Kudos
uarlive
Visitor

Re: mrss feed hls

Thanks for everyone's help. I managed to get this working. It is still strange the mrss feed template didnt play the feed when forced to "hls" by default.
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.