Mobile Media API Section Index
How do I play a series of tones in a sequence?
The MMAPI offers a ToneControl that allows you to specify a series of notes. You can specify characteristics like tempo, volume, and duration for each tone to play back.
After getting player with ...more
Does MMAPI allow me to create custom media event types?
Yes, the PlayerListener identifies the event type by a String, not by class type. This would typically be defined by the MMAPI implementor, not a developer just using the API.
What types of events can I monitor with a PlayerListener?
Just look at the constants in the interface:
static java.lang.String BUFFERING_STARTED
Posted when the Player enters into a buffering mode.
static java.lang.String BUFFERING_STOPPED
...more
What does prefetched mean?
Prefetched is a state for the Player instance. It means the data has been decoded and the resource has been acquired so you can play (or record/capture) data. Until a player is in a prefetched sta...more
What's the mime type for a tone sequence?
The mime type is audio/x-tone-seq.
What's the .jts file extension mean?
The jts file extension is for tone sequences.
What's a .kar file?
The kar file extension is for Karaoke MIDI file.
What's a .kar file?
The kar file extension is for Karaoke MIDI file.
How do I synchronize the playback of two Player instances?
You need to share the TimeBase between the two players:
player1.setTimeBase(player2.getTimeBase())
What protocol is used in the URI to get a player for streaming media?
RTSP is a public standard for streaming media. The locator syntax for
specifying RTSP sessions is:
"rtsp://" address [ ":" port ] [ "/" type ]
How do I find out what content types are support for my platform?
The Manager class has a getSupportedContentTypes() method. Passing in null will return all the supported content types across all protocols. Passing in a specific protocol will report the content ...more
How do I find out what protocols are support for my platform?
The Manager class has a getSupportedProtocols() method. Passing in null will return all the supported protocols across all content types. Passing in a specific mime type will report the protocols ...more
How do I know if my media is random access?
You can get the SourceStream associated with the DataSource and ask for its seek type via getSeekType(). This will return one of NOT_SEEKABLE, RANDOM_ACCESSIBLE, or SEEKABLE_TO_START.
What JSR defines the Mobile Media API?
The MMAPI is defined by JSR 135. For more information, see http://www.jcp.org/en/jsr/detail?id=135.
What's the basic process of capturing audio?
// Get the player
Player player = Manager.createPlayer("capture://audio");
// Realize it
player.realize()
// Get the RecordControl
RecordControl control = (RecordControl)capturePlayer.getContro...more