Commit ae7ef700 authored by Geoffrey Métais's avatar Geoffrey Métais

Video: Do not override service repeat behavior

parent 570d3344
......@@ -1605,11 +1605,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
case MediaPlayer.Event.Stopped:
exitOK();
break;
case MediaPlayer.Event.EndReached:
/* Don't end the activity if the media has subitems since the next child will be
* loaded by the PlaybackService */
if (!mHasSubItems) endReached();
break;
case MediaPlayer.Event.EncounteredError:
encounteredError();
break;
......@@ -1748,29 +1743,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mTitle.setText(mw.getTitle());
}
private void endReached() {
if (mService == null)
return;
if (mService.getRepeatType() == Constants.REPEAT_ONE){
seek(0);
return;
}
// if (mService.expand(false) == 0) {
// mHandler.removeMessages(LOADING_ANIMATION);
// mHandler.sendEmptyMessageDelayed(LOADING_ANIMATION, LOADING_ANIMATION_DELAY);
// Log.d(TAG, "Found a video playlist, expanding it");
// mHandler.post(new Runnable() {
// @Override
// public void run() {
// loadMedia();
// }
// });
// }
//Ignore repeat
if (mService.getRepeatType() == Constants.REPEAT_ALL && mService.getMediaListSize() == 1)
exitOK();
}
private void encounteredError() {
if (isFinishing() || mService.hasNext()) return;
/* Encountered Error, exit player with a message */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment