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

roAudioPlayer SetPositionNotificationPeriod

Is there a way to get updates from the audio player like there is on the video screen? With the video screen I set SetPositionNotificationPeriod and it fires an event, that would be nice with the audio player and would make it more consistent.
0 Kudos
5 REPLIES 5
belltown
Roku Guru

Re: roAudioPlayer SetPositionNotificationPeriod

I don't believe roAudioPlayer has such a function. You'd have to implement your own notification timer. When you get the roAudioPlayer isStatusMessage() for the start of play you could call Mark () on an roTimespan object. In your roAudioPlayer Wait loop you could specify a timeout value. When the timeout occurs you could call TotalSeconds () on your roTimespan object to determine how may seconds have elapsed since the start of the audio stream.
0 Kudos
RokuJoel
Binge Watcher

Re: roAudioPlayer SetPositionNotificationPeriod

You can use roVideoScreen or roVideoPlayer to play audio, and you can get position notification to work in that circumstance, however, this is not currently working on older devices in my testing, so Roku2 and Roku2 LT only.

- Joel
0 Kudos
TheEndless
Channel Surfer

Re: roAudioPlayer SetPositionNotificationPeriod

"RokuJoel" wrote:
You can use roVideoScreen or roVideoPlayer to play audio, and you can get position notification to work in that circumstance, however, this is not currently working on older devices in my testing, so Roku2 and Roku2 LT only.

- Joel

I haven't actually tried using the video components to playback audio, but one thing to be wary of, since the video components prevent the screensaver from kicking in when they're playing, they might do the same if they're playing just audio.
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
SkipFire
Visitor

Re: roAudioPlayer SetPositionNotificationPeriod

Interesting idea, I will consider that. I really like the progress, graphic, and info on the springboard screen though.
0 Kudos
TheEndless
Channel Surfer

Re: roAudioPlayer SetPositionNotificationPeriod

"SkipFire" wrote:
Interesting idea, I will consider that. I really like the progress, graphic, and info on the springboard screen though.

You can use the roVideoPlayer in conjunction with the roSpringboardScreen. It will only display on screen if you explicitly pair it with an roImageCanvas or roScreen.
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