Welcome!

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

Java Development

Reply
Developer
Posts: 66
Registered: ‎05-27-2009
My Device: Not Specified
Accepted Solution

Steaming Audio

Hi there,

I am trying to write an applcation to stream audio from our Windows Media Server. Several questions to start:

 

1. Do I have to implement a buffered stream like in link: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To...

 

2. I tried to use

 

_player = javax.microedition.media.Manager.createPlayer("http://windows_media_server_ip/test_publishing_point/sample.mp3");

_player.start();

 

but got error like "javax.microedition.media.MediaException: unsupported content type - audio/x-ms-wax". Why's mp3 mapped to "audio/x-ms-wax"?

 

3.  How about live streaming? Can I use the syntax like in 2 to live stream an audio?

 

Thanks a lot!

Developer
Posts: 66
Registered: ‎05-27-2009
My Device: Not Specified

Re: Steaming Audio

Forgot to mention that I am using JDE 4.5.0 with default simulator.
Developer
Posts: 66
Registered: ‎05-27-2009
My Device: Not Specified

Re: Steaming Audio

Still waiting...

 

 

Developer
Developer
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified

Re: Steaming Audio

1- The main advantage for using  the buffered stream as in the sample is that you get to save the file locally for future play. If you play it in the future it can be played from a local file.

 

2- It should work fine. Make sure that the server is returning the right mime type.

    I remember using something like that and it worked fine. The only difference that I had ( which may not matter) is to split the start :

            _player = Manager.createPlayer(uri);
            _player.realize();
            _player.prefetch();

            _player.start();

 

I needed to do things after the prefetch.

 

3- It depends on the  network performance. If you are on a 3g, it works perfect. On an EDGE ( 2g) it can be sluggish.

 

Rab

Developer
Posts: 66
Registered: ‎05-27-2009
My Device: Not Specified

Re: Steaming Audio

Thanks Rab! Those are what I wanted to know! I will test them.
Developer
Posts: 66
Registered: ‎05-27-2009
My Device: Not Specified

Re: Steaming Audio

Hi Rab,

 

 how did you set the returning mime types on the Windows Media Server 2003? I googled around but they were about the MIME types on IIS, not Windows Media Server where I want to stream the audio. Thanks a lot!