Search code examples
blackberryaudio-streamingblackberry-simulator

Player streaming audio over http/rtsp (shoutcast also) BlackBerry app


how can i develop a simple audio or audio/video player for blackberry over http and rtsp protocol for BB ?

I'll try to use:

Player p = javax.microedition.media.Manager.createPlayer("rtsp://...");
p.realize();
VolumeControl volume = (VolumeControl)p.getControl("VolumeControl");
volume.setLevel(30);
p.prefetch();
p.start();

it doesn't work on simulator using Eclipse plugin.

EDIT: I need to play Flash radio and shoutcast especially.


Solution

  • Check out the "Streaming media - Start to finish" application from RIM here:

    http://supportforums.blackberry.com/t5/Java-Development/Streaming-media-Start-to-finish/ta-p/488255

    A lot of the complexity in implementing a streaming media application on a mobile device is handling the different transport protocols: Wi-Fi, 3G, EDGE etc. Whilst getting started I would stick to using Wi-Fi only. To do this on the simulator do the following:

    1. Go to Wireless Connections and connect to the 'Default WLAN connection', this will use your normal PC network connection for Internet connectivity.
    2. Append ";interface=wifi" to your streaming URLs.

    You can always build in a transport handler later once the app is working over Wi-Fi.