List of usage examples for android.media MediaPlayer isLooping
public native boolean isLooping();
From source file:com.shahenlibrary.VideoPlayer.VideoPlayerView.java
@Override public void onCompletion(MediaPlayer mp) { if (mp == null) { return;// w w w. ja v a 2 s . c o m } Log.d(LOG_TAG, "onCompletion: isLooping " + mp.isLooping()); if (mLooping) { Log.d(LOG_TAG, "onCompletion: seek to start at : " + videoStartAt); mp.seekTo(videoStartAt); } }
From source file:com.mylovemhz.simplay.MusicService.java
@Override public void onCompletion(MediaPlayer mp) { if (!mp.isLooping()) { currentState = State.COMPLETED; if (hasNext()) { next();/* w w w .j a va 2s. c o m*/ } else { stop(); } } }
From source file:com.kasungunathilaka.sarigama.service.PlayerService.java
public void onCompletion(MediaPlayer mp) { localBroadcastManager.sendBroadcast(new Intent(HomeActivity.ON_COMPLETED)); this.seekTo(0); if (mp.isLooping()) { setPlayPause();//from ww w .jav a2 s .c o m localBroadcastManager.sendBroadcast(new Intent(HomeActivity.ON_PREPARED)); } else { next(); } }