You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You cannot seek when no media source is loaded, which is when prepare has not been called and it is not in the PREPARED state, or after release has been called and the player is RELEASING or RELEASED, or when an error happened and it is in the ERROR state.
There's two possibilities, either ignore seek calls or throw an exception, which is what is happening here because the Android MediaPlayer does it as well and MediaPlayer-Extended is API compatible to the MediaPlayer so it needs to work similarly.
public void seekTo(long usec) {
if(mCurrentState.ordinal() < State.PREPARED.ordinal() && mCurrentState.ordinal() >= State.RELEASING.ordinal()) {
mCurrentState = State.ERROR;
throw new IllegalStateException();
}
.......
}
i have a question about mCurrentState<3 && mCurrentState>5 ?why write like this? it seems never happen
The text was updated successfully, but these errors were encountered: