jbrave
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2010
12:19 AM
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
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!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
6 REPLIES 6
scrager
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2010
04:50 AM
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.


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2010
10:09 AM
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.
jbrave
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2010
04:33 PM
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!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2010
05:05 PM
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

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2010
05:26 PM
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2010
04:16 PM
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
--Kevin