<s>
The	O
Mobile	O
Media	O
API	B-General_Concept
(	O
MMAPI	B-Language
)	O
is	O
an	O
API	B-General_Concept
specification	O
for	O
the	O
Java	B-Language
ME	I-Language
platform	O
CDC	B-Language
and	O
CLDC	B-Language
devices	O
such	O
as	O
mobile	O
phones	O
.	O
</s>
<s>
Depending	O
on	O
how	O
it	O
's	O
implemented	O
,	O
the	O
APIs	B-General_Concept
allow	O
applications	O
to	O
play	O
and	O
record	O
sounds	O
and	O
video	O
,	O
and	O
to	O
capture	O
still	O
images	O
.	O
</s>
<s>
MMAPI	B-Language
was	O
developed	O
under	O
the	O
Java	B-Language
Community	I-Language
Process	I-Language
as	O
JSR	B-Language
135	I-Language
.	O
</s>
<s>
The	O
Multimedia	O
Java	O
API	B-General_Concept
is	O
based	O
around	O
four	O
main	O
types	O
of	O
classes	O
in	O
the	O
javax.microedition.media	O
packagethe	O
Manager	O
,	O
the	O
Player	O
,	O
the	O
PlayerListener	O
and	O
various	O
types	O
of	O
Control	O
.	O
</s>
<s>
Java	B-Language
ME	I-Language
programmers	O
wishing	O
to	O
use	O
JSR	B-Language
135	I-Language
would	O
first	O
make	O
use	O
of	O
the	O
static	O
methods	O
of	O
the	O
Manager	O
class	O
.	O
</s>
<s>
This	O
takes	O
either	O
a	O
URI	B-Protocol
or	O
an	O
,	O
and	O
a	O
MIME	B-Application
type	I-Application
.	O
</s>
<s>
In	O
most	O
cases	O
,	O
URIs	B-Protocol
are	O
used	O
.	O
</s>
<s>
Common	O
URI	B-Protocol
protocols	O
used	O
include	O
:	O
</s>
<s>
http	B-Protocol
:	I-Protocol
</s>
<s>
The	O
MIME	B-Application
type	I-Application
is	O
optional	O
,	O
and	O
is	O
inferred	O
from	O
the	O
data	O
passed	O
in	O
if	O
not	O
supplied	O
.	O
</s>
<s>
The	O
createPlayer	O
method	O
returns	O
an	O
implementation	O
of	O
the	O
Player	O
interface	B-Language
(	O
even	O
if	O
you	O
use	O
a	O
capture	O
:	O
protocol	O
URI	B-Protocol
)	O
.	O
</s>
<s>
You	O
can	O
also	O
setPlayerListener	O
to	O
an	O
object	O
implementing	O
the	O
PlayerListener	O
interface	B-Language
,	O
which	O
will	O
receive	O
various	O
events	O
related	O
to	O
the	O
clip	O
(	O
starting	O
,	O
stopping	O
,	O
media	O
finishing	O
,	O
etc	O
.	O
)	O
</s>
<s>
A	O
Control	O
handles	O
any	O
optional	O
APIs	B-General_Concept
which	O
are	O
not	O
applicable	O
to	O
all	O
media	B-Application
types	I-Application
.	O
</s>
<s>
The	O
set	O
of	O
controls	O
implemented	O
by	O
a	O
Player	O
is	O
not	O
limited	O
;	O
however	O
,	O
some	O
standard	O
ones	O
are	O
defined	O
in	O
the	O
javax.microedition.media.control	O
package	B-Language
by	O
the	O
JSR	O
:	O
</s>
<s>
+	O
Standard	O
MMAPI	B-Language
Controls	O
Control	O
Interface	B-Language
Description	O
FramePositioningControl	O
A	O
control	O
for	O
video	O
data	O
that	O
allows	O
access	O
to	O
individual	O
frames	O
.	O
</s>
<s>
(	O
Others	O
may	O
be	O
defined	O
in	O
JSR	B-Language
234	I-Language
(	O
Advanced	B-Language
Multimedia	I-Language
Supplements	I-Language
)	O
.	O
</s>
<s>
A	O
subset	O
of	O
JSR	B-Language
135	I-Language
is	O
defined	O
in	O
JSR	B-Language
118	I-Language
(	O
MIDP	B-Language
2.0	I-Language
)	O
.	O
</s>
<s>
Regardless	O
of	O
the	O
protocol	O
or	O
media	B-Application
type	I-Application
involved	O
,	O
the	O
Player	O
moves	O
through	O
the	O
same	O
discrete	O
states	O
during	O
its	O
lifecycle	O
.	O
</s>
<s>
As	O
with	O
most	O
Java	B-Language
ME	I-Language
specifications	O
,	O
implementations	O
differ	O
despite	O
the	O
best	O
efforts	O
of	O
the	O
specification	O
authors	O
to	O
ensure	O
consistency	O
.	O
</s>
<s>
Two	O
obvious	O
areas	O
for	O
differences	O
are	O
in	O
the	O
controls	O
supported	O
,	O
and	O
in	O
the	O
acceptable	O
URI	B-Protocol
types	O
in	O
the	O
first	O
place	O
.	O
</s>
<s>
More	O
obscure	O
areas	O
are	O
whether	O
mixing	O
is	O
supported	O
;	O
many	O
games	O
would	O
like	O
to	O
play	O
a	O
MIDI	O
music	O
track	O
and	O
layer	O
PCM	B-Algorithm
sound	O
effects	O
on	O
top	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
an	O
HTTP	B-Protocol
clip	O
is	O
requested	O
,	O
at	O
what	O
point	O
does	O
the	O
clip	O
get	O
downloaded	O
?	O
</s>
<s>
Symbian	B-Operating_System
OS	I-Operating_System
contains	O
a	O
very	O
complete	O
implementation	O
of	O
JSR	B-Language
135	I-Language
,	O
but	O
even	O
this	O
is	O
highly	O
dependent	O
on	O
the	O
underlying	O
multimedia	O
capabilities	O
of	O
the	O
device	O
,	O
and	O
some	O
device	O
manufacturers	O
may	O
choose	O
not	O
to	O
expose	O
the	O
more	O
obscure	O
parts	O
of	O
Java	B-Language
ME	I-Language
such	O
as	O
recording	O
.	O
</s>
<s>
Implementation	O
consistency	O
is	O
ensured	O
by	O
forcing	O
all	O
implementations	O
to	O
pass	O
the	O
Java	O
Technology	B-Language
Compatibility	I-Language
Kit	I-Language
(	O
TCK	O
)	O
.	O
</s>
<s>
This	O
ensures	O
that	O
each	O
supported	O
URI	B-Protocol
schema	O
,	O
MIME	B-Application
type	I-Application
and	O
Control	O
is	O
tested	O
,	O
but	O
does	O
not	O
test	O
every	O
permutation	O
of	O
these	O
optional	O
parts	O
.	O
</s>
