public void pause ( int position ) throws IllegalStateException { // allow pause if playing or stopped switch ( subscriberStream . getState ( ) ) { case PLAYING : case STOPPED : subscriberStream . setState ( StreamState . PAUSED ) ; clearWaitJobs ( ) ; sendPauseStatus ( currentItem . get ( ) ) ; sendClearPing ( ) ; subscriberStream . onChange ( StreamState . PAUSED , currentItem . get ( ) , position ) ; break ; default : throw new IllegalStateException ( "Cannot pause in current state" ) ; } }
Pause at position