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 isPlaying?

Is there any isPlaying property for the audio player? I am trying to implement the progress bar and as long as I don't pause or stop playback it seems to work ok, but as soon as a use pause or playback the counter gets out of sync with where the song actually is, and if the stream gets interrupted I am totally out of whack.

Ideal would of course be to have it work more like the video side where it can handle progress relatively automatically, but just adding the length property and isPlaybackPosition message would really make it pretty easy to implement progress bars.
0 Kudos
3 REPLIES 3
RokuChris
Roku Employee
Roku Employee

Re: roAudioPlayer isPlaying?

No, there isn't. You'll need to keep track of the audio player's state on your own. The various isStatusMessage events can be helpful with that task.
0 Kudos
SkipFire
Visitor

Re: roAudioPlayer isPlaying?

I am finding my progress bar sometimes being all the way full even though the song isn't near the end. I've only seen it a couple of times when it has been paused and coming out of screensaver, but I can't make it happen on demand so it isn't just pausing and the screensaver that causes the problem. My guess is some event is being fired that goes into the code where I set my own isplaying = true when it shouldn't, hence the desire for a property of IsPlaying, then there would be no doubt.

It isn't a big enough problem for me to be overly concerned about, though I'm sure at some point it will bug me enough that I will track it down till I figure it out.
0 Kudos
belltown
Roku Guru

Re: roAudioPlayer isPlaying?

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.