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: 
jbrave
Channel Surfer

Springboard Progress Indicator questions

There seems to be a method for setting the progress indicator's position in an audio player Springboard. How do we find out the position in the audio file in order to update this?

Also, is there any way to create a custom progress indicator image using images retrieved over the network?

Thanks,

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
6 REPLIES 6
scrager
Visitor

Re: Springboard Progress Indicator questions

It's been a while since i've done brightscript coding, but from what I remember, there is a setting for the track length on the audio player screen that you can set. That and linking the audio player to the audio screen and then the system takes care of the progress indicator for you.
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Springboard Progress Indicator questions

"jbrave" wrote:
Also, is there any way to create a custom progress indicator image using images retrieved over the network?


You could do that with roImageCanvas and build your own audio screen rather than use a roSpringboardScreen. The customvideoplayer sample uses that approach for a video screen.
0 Kudos
jbrave
Channel Surfer

Re: Springboard Progress Indicator questions



You could do that with roImageCanvas and build your own audio screen rather than use a roSpringboardScreen. The customvideoplayer sample uses that approach for a video screen.


Well, that might work, but there is still a question of getting the index to the actual location in the song. In the springboard even, I don't see how knowing the length of the track gives you an accurate index to the song position since there are unknown delays in requesting and retrieving, not to mention decoding the mp3 file...

Any further info would be helpful.

Thanks,

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Springboard Progress Indicator questions

"jbrave" wrote:
I don't see how knowing the length of the track gives you an accurate index to the song position since there are unknown delays in requesting and retrieving, not to mention decoding the mp3 file...


roAudioPlayer generates a "start of play" event when the initial buffer completes and the audio starts playing, that would be your zero mark. From there you can trigger the wait() function once per second and increment a counter to know where in the audio you are. This thread may be helpful viewtopic.php?f=34&t=26345
0 Kudos
TheEndless
Channel Surfer

Re: Springboard Progress Indicator questions

"RokuChris" wrote:
roAudioPlayer generates a "start of play" event when the initial buffer completes and the audio starts playing, that would be your zero mark. From there you can trigger the wait() function once per second and increment a counter to know where in the audio you are. This thread may be helpful viewtopic.php?f=34&t=26345

For what it's worth, I've found that audio playback actually starts well before the "start of play" event. You're results may be different, but I've found that there's 13% buffering, then a isListItemSelected() event, at which point audio playback starts, then the remainder of the buffering, and then the "start of play" event.

You may also want to user a timer and Mark() it when playback starts rather than rely on the 1000ms wait timeout. Again, that's up to your preference, but I found that to be a little more reliable.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
RokuKevin
Visitor

Re: Springboard Progress Indicator questions

Unfortunately, we don't yet have audio progress events.... So the progress bar must be updated by getting the duration of the song from your feed and tracking time via your event loop (a wait timeout of 1 sec is a good update interval) and using roDateTime for an accurate assessment of elapsed time.

--Kevin
0 Kudos