Players can be created with the following methods :
Manager.createPlayer( java.lang.String locator
)
Manager.createPlayer( java.io.InputStream stream,
java.lang.String type )
Manager.createPlayer( DataSource source )
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: