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

star rating & runtime

Hi,
i'm tweaking the videoplayer example and I have come across a little problem.
I want to remove the ratings stars from the details screen and also the running time
Also when I remove one of the buttons to play it breaks
how can i do these things
Cheers
Kevin
0 Kudos
11 REPLIES 11
journeyman73
Visitor

Re: star rating & runtime

Hi, just an update.
I've sorted the button issue but i have another question.
in the xml I want to use a live stream, are there settings i need for it?
Kev
0 Kudos
journeyman73
Visitor

Re: star rating & runtime

anybody have any ideas????
Kevin
0 Kudos
destruk
Binge Watcher

Re: star rating & runtime

From the simpleVideoPlayer example with a live stream, the xml has

' Big Buck Bunny test stream from Wowza
'urls = ["http://ec2-174-129-153-104.compute-1.amazonaws.com:1935/vod/smil:BigBuckBunny.smil/playlist.m3u8"]
'qualities = ["SD"]
'streamformat = "hls"
'title = "Big Buck Bunny"

I don't know if 'qualities' is required or not.
0 Kudos
journeyman73
Visitor

Re: star rating & runtime

yea the xml does not have those qualities in there but the icons still appear on the video details page
Cheers
0 Kudos
bandal
Visitor

Re: star rating & runtime

I am also looking for a way to remove the stars in the videoplayer example. I removed the color, but the graphical stars I have not found yet. Must be a static variable somewhere. Let us know what is found if we don't find it in the videoplayer example code.

Update: I added this line in Bold in the videoplayer example to remove the stars in the appDetailScreen.brs file:

screen.ClearButtons()
screen.AddButton(1, "Resume Playing")
screen.AddButton(2, "Play from Beginning")
'Remove stars from screen
screen.SetStaticRatingEnabled(false)
screen.SetContent(show)
screen.Show()

DA
0 Kudos
creator
Visitor

Re: star rating & runtime

Thanks to Bandal for the answer on how to remove the star ratings. I also could not find anything to take out of the code to make the stars go away. Does anybody know how to take the runtime info out also. I am trying to do this also. I added a little square to the end of the code Bandal gave us and it worked for me. I guess the square is like a period in a sentance of code.
0 Kudos
creator
Visitor

Re: star rating & runtime

The time is in sec in the xml. It is <runtime>sec</runtime>. 1hr 10 min = 4200 sec for it to display 1hr 10 min. I tried to take the runtime code out but it just displayed 0 for the run time. Does anybody know what I can do to not display zero run time. I don't want to display any runtime.
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: star rating & runtime

"creator" wrote:
The time is in sec in the xml. It is <runtime>sec</runtime>. 1hr 10 min = 4200 sec for it to display 1hr 10 min. I tried to take the runtime code out but it just displayed 0 for the run time. Does anybody know what I can do to not display zero run time. I don't want to display any runtime.


To not display the runtime, the length attribute of your content-meta-data structure needs to be invalid. If I recall correctly, the parsing logic in the sample converts an empty string to zero. So you'd need to modify that part of the code and remove the line that assigns the value of the length attribute.
0 Kudos
RokuJoel
Binge Watcher

Re: star rating & runtime

I think if you comment-out, or remove this line:

item.Runtime = validstr(curShow.runtime.GetText())

and this line:

item.Length = strtoi(item.Runtime)

in function parse_show_feed, which is in showFeed.brs, that will remove it.

(to comment a line out, so that it no longer does anything, just put a single-quote mark in front of it like this):

'this line is just a comment


- Joel
0 Kudos