Method Name |
Valid Sates |
Invalid states |
Comments |
Attachauxeffect |
{Initialized, prepared, started, paused, stopped, playbackcompleted} |
{Idle, error} |
This method must be called after setdatasource. Calling it does not change the object state. |
Getaudiosessionid |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Getcurrentposition |
{Idle, initialized, prepared, started, paused, stopped, playbackcompleted} |
{Error} |
Successful invoke of this method in a valid State does not change the state. Calling this method in an invalid state transfers the object toErrorState. |
Getduration |
{Prepared, started, paused, stopped, playbackcompleted} |
{Idle, initialized, error} |
Successful invoke of this method in a valid State does not change the state. Calling this method in an invalid state transfers the object toErrorState. |
Getvideoheight |
{Idle, initialized, prepared, started, paused, stopped, playbackcompleted} |
{Error} |
Successful invoke of this method in a valid State does not change the state. Calling this method in an invalid state transfers the object toErrorState. |
Getvideowidth |
{Idle, initialized, prepared, started, paused, stopped, playbackcompleted} |
{Error} |
Successful invoke of this method in a valid State does not change the state. Calling this method in an invalid state transfers the object toErrorState. |
Isplaying |
{Idle, initialized, prepared, started, paused, stopped, playbackcompleted} |
{Error} |
Successful invoke of this method in a valid State does not change the state. Calling this method in an invalid state transfers the object toErrorState. |
Pause |
{Started, paused} |
{Idle, initialized, prepared, stopped, playbackcompleted, error} |
Successful invoke of this method in a valid state transfers the object toPausedState. Calling this method in an invalid state transfers the object toErrorState. |
Prepare |
{Initialized, stopped} |
{Idle, prepared, started, paused, playbackcompleted, error} |
Successful invoke of this method in a valid state transfers the object toPreparedState. Calling this method in an invalid state throws an illegalstateexception. |
Prepareasync |
{Initialized, stopped} |
{Idle, prepared, started, paused, playbackcompleted, error} |
Successful invoke of this method in a valid state transfers the object toPreparingState. Calling this method in an invalid state throws an illegalstateexception. |
Release |
Any |
{} |
Afterrelease() , The object is no longer available. |
Reset |
{Idle, initialized, prepared, started, paused, stopped, playbackcompleted, error} |
{} |
Afterreset() , The object is like being just created. |
Seekto |
{Prepared, started, paused, playbackcompleted} |
{Idle, initialized, stopped, error} |
Successful invoke of this method in a valid State does not change the state. Calling this method in an invalid state transfers the object toErrorState. |
Setaudiosessionid |
{Idle} |
{Initialized, prepared, started, paused, stopped, playbackcompleted, error} |
This method must be called in idle state as the audio session ID must be known before calling setdatasource. Calling it does not change the object state. |
Setaudiostreamtype |
{Idle, initialized, stopped, prepared, started, paused, playbackcompleted} |
{Error} |
Successful invoke of this method does not change the State. In order for the target audio stream type to become valid tive, this method must be called before prepare () or prepareasync (). |
Setauxeffectsendlevel |
Any |
{} |
Calling this method does not change the object state. |
Setdatasource |
{Idle} |
{Initialized, prepared, started, paused, stopped, playbackcompleted, error} |
Successful invoke of this method in a valid state transfers the object toInitializedState. Calling this method in an invalid state throws an illegalstateexception. |
Setdisplay |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setsurface |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setlooping |
{Idle, initialized, stopped, prepared, started, paused, playbackcompleted} |
{Error} |
Successful invoke of this method in a valid State does not change the state. Calling this method in an invalid state transfers the object toErrorState. |
Islooping |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setonbufferingupdatelistener |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setoncompletionlistener |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setonerrorlistener |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setonpreparedlistener |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setonseekcompletelistener |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setscreenonwhileplaying </> |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Setvolume |
{Idle, initialized, stopped, prepared, started, paused, playbackcompleted} |
{Error} |
Successful invoke of this method does not change the state. |
Setwakemode |
Any |
{} |
This method can be called in any state and calling it does not change the object state. |
Start |
{Prepared, started, paused, playbackcompleted} |
{Idle, initialized, stopped, error} |
Successful invoke of this method in a valid state transfers the object toStartedState. Calling this method in an invalid state transfers the object toErrorState. |
Stop |
{Prepared, started, stopped, paused, playbackcompleted} |
{Idle, initialized, error} |
Successful invoke of this method in a valid state transfers the object toStoppedState. Calling this method in an invalid state transfers the object toErrorState. |