×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    10

    Couldn't create a mp3 player on the project device

    Hi
    Code:
    public void load() 
    	{
    	     if(player != null) return;
    	     try {
    	          InputStream is = this.getClass().getResourceAsStream(file);
    	          player = Manager.createPlayer(is , "audio/mp3");
    	          player.prefetch();
    	          volumeControl = (VolumeControl) player.getControl("VolumeControl");
    	      } catch (IOException e) {
    	      } catch (MediaException e) {
    	      }
        }
    player is simply null on the project device
    Should I run it as Midlet, JAD, applet or application?
    Thanks
    Jack

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Couldn't create a mp3 player on the project device

    Based on the documentation, http://www.developer.nokia.com/Resou...a/Manager.html, I would try "audio/mpeg".

  3. #3
    Registered User
    Join Date
    Jul 2012
    Posts
    10

    Re: Couldn't create a mp3 player on the project device



    Which one should I choose?

    Code:
    public void load() 
    	{
    	     if(player != null) return;
    	     try {
    	          InputStream is = this.getClass().getResourceAsStream(file);
    	          player = Manager.createPlayer(is , "audio/mpeg");
    	          player.prefetch();
    	          volumeControl = (VolumeControl) player.getControl("VolumeControl");
    	      } catch (IOException e) {
    	      } catch (MediaException e) {
    	      }
        }
    Unfortunately, this still makes a null player. I believe that should work too. Strange.
    Thanks
    Jack
    Last edited by lucky7456969; 2012-09-17 at 09:23.

  4. #4
    Nokia Developer Expert
    Join Date
    May 2012
    Location
    Espoo
    Posts
    224

    Re: Couldn't create a mp3 player on the project device

    Emulated Java ME MIDlet is the correct one.

Similar Threads

  1. cannot create player
    By amalshah71 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2010-12-23, 10:14
  2. Could Not Create Player
    By j2meSak in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2009-11-19, 09:27
  3. Unable to create player
    By hiteshrawat in forum Mobile Java General
    Replies: 15
    Last Post: 2009-06-16, 14:11
  4. Create Player
    By sureshA in forum Audio
    Replies: 3
    Last Post: 2008-09-27, 18:45
  5. Cannot create player..
    By bharatpatel85 in forum Mobile Java General
    Replies: 5
    Last Post: 2008-05-13, 17:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×