Example usage for android.support.v4.media.session PlaybackStateCompat REPEAT_MODE_GROUP

List of usage examples for android.support.v4.media.session PlaybackStateCompat REPEAT_MODE_GROUP

Introduction

In this page you can find the example usage for android.support.v4.media.session PlaybackStateCompat REPEAT_MODE_GROUP.

Prototype

int REPEAT_MODE_GROUP

To view the source code for android.support.v4.media.session PlaybackStateCompat REPEAT_MODE_GROUP.

Click Source Link

Document

Use this value with MediaControllerCompat.TransportControls#setRepeatMode to indicate that the playback of the playing media group will be repeated.

Usage

From source file:com.google.android.exoplayer2.ext.mediasession.DefaultPlaybackController.java

@Override
public void onSetRepeatMode(Player player, int repeatMode) {
    int selectedExoPlayerRepeatMode = player.getRepeatMode();
    switch (repeatMode) {
    case PlaybackStateCompat.REPEAT_MODE_ALL:
    case PlaybackStateCompat.REPEAT_MODE_GROUP:
        if ((repeatToggleModes & RepeatModeUtil.REPEAT_TOGGLE_MODE_ALL) != 0) {
            selectedExoPlayerRepeatMode = Player.REPEAT_MODE_ALL;
        }/*www  .  j  a va 2  s . com*/
        break;
    case PlaybackStateCompat.REPEAT_MODE_ONE:
        if ((repeatToggleModes & RepeatModeUtil.REPEAT_TOGGLE_MODE_ONE) != 0) {
            selectedExoPlayerRepeatMode = Player.REPEAT_MODE_ONE;
        }
        break;
    default:
        selectedExoPlayerRepeatMode = Player.REPEAT_MODE_OFF;
        break;
    }
    player.setRepeatMode(selectedExoPlayerRepeatMode);
}