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: 
eidentity
Reel Rookie

Help with videoplayer example

Hello,
I have set up the videoplayer code example to run against my server,
and everthing was working great... I was tweaking the code and xml,
and learning the ins and outs of the whole system, including the debugger.
I started to serve up different stream formats, and when I got around to using a .wmv,
I encounterd a problem, I have not been able to get around.

I found a snag in the file:appDetailScreen.brs, function:refreshShowDetail,
where the StreamFormat is, hardcoded as "mp4".
I have tried many different ways to grab the information from an Array or Current Selection object to no avail.
I am just not "getting it".
If anyone could help me understand how to dynamically assign the streamFormat,
withint the confines of the videoplayer example, I would appreciatte it.
Thanks,
eidentity
0 Kudos
2 REPLIES 2
nowhereman
Visitor

Re: Help with videoplayer example

"eidentity" wrote:
Hello,
I have set up the videoplayer code example to run against my server,
and everthing was working great... I was tweaking the code and xml,
and learning the ins and outs of the whole system, including the debugger.
I started to serve up different stream formats, and when I got around to using a .wmv,
I encounterd a problem, I have not been able to get around.

I found a snag in the file:appDetailScreen.brs, function:refreshShowDetail,
where the StreamFormat is, hardcoded as "mp4".
I have tried many different ways to grab the information from an Array or Current Selection object to no avail.
I am just not "getting it".
If anyone could help me understand how to dynamically assign the streamFormat,
withint the confines of the videoplayer example, I would appreciatte it.
Thanks,
eidentity


The thing that confused me when trying to accomplish a similar thing is that the XML for the example and the parsing code in ShowFeed.brs build an array of StreamFormat's, but the content-meta-data structure only expects a single StreamFormat. My solution was just to grab the first value out of that array of StreamFormat's and use it.

show.StreamFormat = show.StreamFormats[0] 


Hope that helps.
twitter:nowhereman
http://www.thenowhereman.com/roku
http://www.thenowhereman.com/netflix
0 Kudos
eidentity
Reel Rookie

Re: Help with videoplayer example

Awesome, works great,Thanks!

I dont know if I was over thinking it, or just being stupid.

When I decided to ask for help I was trying this bad idea:
"show.StreamFormat=showList[showIndex].media[0].streamFormat.GetText()"

Thanks Again,
eidentity
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.