Create player

Players can be created with the following methods in the S60 implementation:

The Manager.createPlayer( java.lang.String locator ) method accepts a locator URI. Example:

Manager.createPlayer( "http://some.domain/media.wav" )

The Manager.createPlayer( java.io.InputStream stream, java.lang.String type ) method accepts an InputStream which contains the media contents and a MIME type. This is the way that is used, for example, to play media that is included in the MIDlet jar file. Example:

InputStream in = getClass().getResourceAsStream( "/media.wav" );
Manager.createPlayer( in, "audio/wav" )

Manager.createPlayer( DataSource source ) can be used for custom protocols. When a DataSource is used, player is created using available information from DataSource in the following order:

  1. Using locator

  2. Using content type

  3. Using content header data