Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Developer
Posts: 6
Registered: ‎01-07-2013
My Device: Bold 9900
My Carrier: Rogers

Streaming audio

Hi everyone,


Using the MediaPlayer I've been able to get the audio from the internet radio stream (sourceUrl: ***.***) that I'm needing.

With NowPlaying, the physical play/pause button works correctly.

However, with a "Stop Playing" button on the app, it stops the stream; clicking the "start stream" button again doesn't restart the stream again.


Is there a reset/reload element I'm missing, to get it working again? I have if/else statements on both mediaplayer and nowplaying.

Below is the code of both buttons, maybe there's a (else) function I can try. I'd then convert it to just one button, with it providing the start and stop function.

Thanks for your help!


Button {

         text: "Listen Now"

         onClicked: {

         if (player.mediaState == MediaState.Started) nowPlaying.revoke(); 

         else nowPlaying.acquire()


         playButton.text= ""




Button {

        text: "Stop Playing"

        onClicked: {








New Contributor
Posts: 6
Registered: ‎08-23-2013
My Device: Z10
My Carrier: Entel

Re: Streaming audio

Hi, I'm working in a Streaming app and I have the same problem.

A local mp3 works fine and if you make pause instead stop that also works fine, but if you make one stop, the play does not work anymore.


The only difference whit your code is that fired the play inside the onAcquired method.


Do you have any solution at this time?