Nirmal- thInk beYond
Nirmal- thInk beYond

Reputation: 12064

Unable to play mp3 in j2me

I am trying to play file from direct web link(http) but it throws exception:

Can not create player for: Unsupported contect type

code is simple as

Player player = Manager.createPlayer("http://c648382.r82.cf2.rackcdn.com/01_Genesis_001/0001.mp3");
player.realize();
player.start();

here is StackTrace:

javax.microedition.media.MediaException: Cannot create a Player for: Unsupported content type
    at javax.microedition.media.Manager.getPlayerFromType(+13)
    at javax.microedition.media.Manager.createPlayer(+35)
    at javax.microedition.media.Manager.createPlayer(+389)

I am using WTK 2.5.2 and DefaultColorPhone emulator

any suggestion?

Upvotes: 1

Views: 914

Answers (1)

gnat
gnat

Reputation: 6227

as far as I know 2.5.2 does not support mp3. Did you try newer versions of emulator?

Also per my recollection there is a way to programmatically find out content types supported by particular device / emulator. Check JSR 135 (MMAPI) javadocs for details if you're interested.

Upvotes: 1

Related Questions