Forum Discussion

SkipFire's avatar
SkipFire
Visitor
14 years ago

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.

5 Replies

  • 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.
  • 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
  • "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.
  • Interesting idea, I will consider that. I really like the progress, graphic, and info on the springboard screen though.
  • "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.