Search in sources :

Example 1 with PlaybackException

use of androidx.media3.common.PlaybackException in project media by androidx.

the class DrmPlaybackTest method clearkeyPlayback.

@Test
public void clearkeyPlayback() throws Exception {
    MockWebServer mockWebServer = new MockWebServer();
    mockWebServer.enqueue(new MockResponse().setResponseCode(200).setBody(CLEARKEY_RESPONSE));
    mockWebServer.start();
    MediaItem mediaItem = new MediaItem.Builder().setUri("asset:///media/drm/sample_fragmented_clearkey.mp4").setDrmConfiguration(new MediaItem.DrmConfiguration.Builder(C.CLEARKEY_UUID).setLicenseUri(mockWebServer.url("license").toString()).build()).build();
    AtomicReference<ExoPlayer> player = new AtomicReference<>();
    ConditionVariable playbackComplete = new ConditionVariable();
    AtomicReference<PlaybackException> playbackException = new AtomicReference<>();
    getInstrumentation().runOnMainSync(() -> {
        player.set(new ExoPlayer.Builder(getInstrumentation().getContext()).build());
        player.get().addListener(new Player.Listener() {

            @Override
            public void onPlaybackStateChanged(@Player.State int playbackState) {
                if (playbackState == Player.STATE_ENDED) {
                    playbackComplete.open();
                }
            }

            @Override
            public void onPlayerError(PlaybackException error) {
                playbackException.set(error);
                playbackComplete.open();
            }
        });
        player.get().setMediaItem(mediaItem);
        player.get().prepare();
        player.get().play();
    });
    playbackComplete.block();
    getInstrumentation().runOnMainSync(() -> player.get().release());
    getInstrumentation().waitForIdleSync();
    assertThat(playbackException.get()).isNull();
}
Also used : PlaybackException(androidx.media3.common.PlaybackException) MockResponse(okhttp3.mockwebserver.MockResponse) Player(androidx.media3.common.Player) ExoPlayer(androidx.media3.exoplayer.ExoPlayer) AtomicReference(java.util.concurrent.atomic.AtomicReference) ExoPlayer(androidx.media3.exoplayer.ExoPlayer) ConditionVariable(androidx.media3.common.util.ConditionVariable) MediaItem(androidx.media3.common.MediaItem) MockWebServer(okhttp3.mockwebserver.MockWebServer) Test(org.junit.Test)

Example 2 with PlaybackException

use of androidx.media3.common.PlaybackException in project media by androidx.

the class PlayerInfo method fromBundle.

private static PlayerInfo fromBundle(Bundle bundle) {
    @Nullable PlaybackException playerError = BundleableUtil.fromNullableBundle(PlaybackException.CREATOR, bundle.getBundle(keyForField(FIELD_PLAYBACK_ERROR)));
    int mediaItemTransitionReason = bundle.getInt(keyForField(FIELD_MEDIA_ITEM_TRANSITION_REASON), MEDIA_ITEM_TRANSITION_REASON_REPEAT);
    SessionPositionInfo sessionPositionInfo = BundleableUtil.fromNullableBundle(SessionPositionInfo.CREATOR, bundle.getBundle(keyForField(FIELD_SESSION_POSITION_INFO)), SessionPositionInfo.DEFAULT);
    PositionInfo oldPositionInfo = BundleableUtil.fromNullableBundle(PositionInfo.CREATOR, bundle.getBundle(keyForField(FIELD_OLD_POSITION_INFO)), SessionPositionInfo.DEFAULT_POSITION_INFO);
    PositionInfo newPositionInfo = BundleableUtil.fromNullableBundle(PositionInfo.CREATOR, bundle.getBundle(keyForField(FIELD_NEW_POSITION_INFO)), SessionPositionInfo.DEFAULT_POSITION_INFO);
    int discontinuityReason = bundle.getInt(keyForField(FIELD_DISCONTINUITY_REASON), DISCONTINUITY_REASON_AUTO_TRANSITION);
    @Nullable Bundle playbackParametersBundle = bundle.getBundle(keyForField(FIELD_PLAYBACK_PARAMETERS));
    PlaybackParameters playbackParameters = BundleableUtil.fromNullableBundle(PlaybackParameters.CREATOR, playbackParametersBundle, /* defaultValue= */
    PlaybackParameters.DEFAULT);
    @Player.RepeatMode int repeatMode = bundle.getInt(keyForField(FIELD_REPEAT_MODE), /* defaultValue= */
    Player.REPEAT_MODE_OFF);
    boolean shuffleModeEnabled = bundle.getBoolean(keyForField(FIELD_SHUFFLE_MODE_ENABLED), /* defaultValue= */
    false);
    Timeline timeline = BundleableUtil.fromNullableBundle(Timeline.CREATOR, bundle.getBundle(keyForField(FIELD_TIMELINE)), Timeline.EMPTY);
    VideoSize videoSize = BundleableUtil.fromNullableBundle(VideoSize.CREATOR, bundle.getBundle(keyForField(FIELD_VIDEO_SIZE)), VideoSize.UNKNOWN);
    MediaMetadata playlistMetadata = BundleableUtil.fromNullableBundle(MediaMetadata.CREATOR, bundle.getBundle(keyForField(FIELD_PLAYLIST_METADATA)), MediaMetadata.EMPTY);
    float volume = bundle.getFloat(keyForField(FIELD_VOLUME), /* defaultValue= */
    1);
    AudioAttributes audioAttributes = BundleableUtil.fromNullableBundle(AudioAttributes.CREATOR, bundle.getBundle(keyForField(FIELD_AUDIO_ATTRIBUTES)), /* defaultValue= */
    AudioAttributes.DEFAULT);
    List<Cue> cues = BundleableUtil.fromBundleNullableList(Cue.CREATOR, bundle.getParcelableArrayList(keyForField(FIELD_CUES)), /* defaultValue= */
    ImmutableList.of());
    @Nullable Bundle deviceInfoBundle = bundle.getBundle(keyForField(FIELD_DEVICE_INFO));
    DeviceInfo deviceInfo = BundleableUtil.fromNullableBundle(DeviceInfo.CREATOR, deviceInfoBundle, /* defaultValue= */
    DeviceInfo.UNKNOWN);
    int deviceVolume = bundle.getInt(keyForField(FIELD_DEVICE_VOLUME), /* defaultValue= */
    0);
    boolean deviceMuted = bundle.getBoolean(keyForField(FIELD_DEVICE_MUTED), /* defaultValue= */
    false);
    boolean playWhenReady = bundle.getBoolean(keyForField(FIELD_PLAY_WHEN_READY), /* defaultValue= */
    false);
    int playWhenReadyChangedReason = bundle.getInt(keyForField(FIELD_PLAY_WHEN_READY_CHANGED_REASON), /* defaultValue= */
    PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST);
    @Player.PlaybackSuppressionReason int playbackSuppressionReason = bundle.getInt(keyForField(FIELD_PLAYBACK_SUPPRESSION_REASON), /* defaultValue= */
    PLAYBACK_SUPPRESSION_REASON_NONE);
    @Player.State int playbackState = bundle.getInt(keyForField(FIELD_PLAYBACK_STATE), /* defaultValue= */
    STATE_IDLE);
    boolean isPlaying = bundle.getBoolean(keyForField(FIELD_IS_PLAYING), /* defaultValue= */
    false);
    boolean isLoading = bundle.getBoolean(keyForField(FIELD_IS_LOADING), /* defaultValue= */
    false);
    MediaMetadata mediaMetadata = BundleableUtil.fromNullableBundle(MediaMetadata.CREATOR, bundle.getBundle(keyForField(FIELD_MEDIA_METADATA)), MediaMetadata.EMPTY);
    long seekBackIncrementMs = bundle.getLong(keyForField(FIELD_SEEK_BACK_INCREMENT_MS), /* defaultValue= */
    0);
    long seekForwardIncrementMs = bundle.getLong(keyForField(FIELD_SEEK_FORWARD_INCREMENT_MS), /* defaultValue= */
    0);
    long maxSeekToPreviousPosition = bundle.getLong(keyForField(FIELD_MAX_SEEK_TO_PREVIOUS_POSITION_MS), /* defaultValue= */
    0);
    TrackSelectionParameters trackSelectionParameters = BundleableUtil.fromNullableBundle(TrackSelectionParameters.CREATOR, bundle.getBundle(keyForField(FIELD_TRACK_SELECTION_PARAMETERS)), TrackSelectionParameters.DEFAULT_WITHOUT_CONTEXT);
    return new PlayerInfo(playerError, mediaItemTransitionReason, sessionPositionInfo, oldPositionInfo, newPositionInfo, discontinuityReason, playbackParameters, repeatMode, shuffleModeEnabled, videoSize, timeline, playlistMetadata, volume, audioAttributes, cues, deviceInfo, deviceVolume, deviceMuted, playWhenReady, playWhenReadyChangedReason, playbackSuppressionReason, playbackState, isPlaying, isLoading, mediaMetadata, seekBackIncrementMs, seekForwardIncrementMs, maxSeekToPreviousPosition, trackSelectionParameters);
}
Also used : PlaybackException(androidx.media3.common.PlaybackException) PlaybackSuppressionReason(androidx.media3.common.Player.PlaybackSuppressionReason) Bundle(android.os.Bundle) AudioAttributes(androidx.media3.common.AudioAttributes) State(androidx.media3.common.Player.State) Timeline(androidx.media3.common.Timeline) Cue(androidx.media3.common.text.Cue) TrackSelectionParameters(androidx.media3.common.TrackSelectionParameters) VideoSize(androidx.media3.common.VideoSize) DeviceInfo(androidx.media3.common.DeviceInfo) PositionInfo(androidx.media3.common.Player.PositionInfo) MediaMetadata(androidx.media3.common.MediaMetadata) Nullable(androidx.annotation.Nullable) PlaybackParameters(androidx.media3.common.PlaybackParameters)

Example 3 with PlaybackException

use of androidx.media3.common.PlaybackException in project media by androidx.

the class MediaControllerImplLegacy method buildNewControllerInfo.

private static ControllerInfo buildNewControllerInfo(boolean initialUpdate, LegacyPlayerInfo oldLegacyPlayerInfo, ControllerInfo oldControllerInfo, LegacyPlayerInfo newLegacyPlayerInfo, long sessionFlags, boolean isSessionReady, @RatingCompat.Style int ratingType, long timeDiffMs) {
    QueueTimeline currentTimeline;
    MediaMetadata mediaMetadata;
    int currentMediaItemIndex;
    MediaMetadata playlistMetadata;
    @RepeatMode int repeatMode;
    boolean shuffleModeEnabled;
    SessionCommands availableSessionCommands;
    Commands availablePlayerCommands;
    ImmutableList<CommandButton> customLayout;
    boolean isQueueChanged = oldLegacyPlayerInfo.queue != newLegacyPlayerInfo.queue;
    currentTimeline = isQueueChanged ? QueueTimeline.create(newLegacyPlayerInfo.queue) : new QueueTimeline((QueueTimeline) oldControllerInfo.playerInfo.timeline);
    boolean isMetadataCompatChanged = oldLegacyPlayerInfo.mediaMetadataCompat != newLegacyPlayerInfo.mediaMetadataCompat || initialUpdate;
    long oldActiveQueueId = getActiveQueueId(oldLegacyPlayerInfo.playbackStateCompat);
    long newActiveQueueId = getActiveQueueId(newLegacyPlayerInfo.playbackStateCompat);
    boolean isCurrentActiveQueueIdChanged = (oldActiveQueueId != newActiveQueueId) || initialUpdate;
    if (isMetadataCompatChanged || isCurrentActiveQueueIdChanged || isQueueChanged) {
        currentMediaItemIndex = findQueueItemIndex(newLegacyPlayerInfo.queue, newActiveQueueId);
        boolean hasMediaMetadataCompat = newLegacyPlayerInfo.mediaMetadataCompat != null;
        if (hasMediaMetadataCompat && isMetadataCompatChanged) {
            mediaMetadata = MediaUtils.convertToMediaMetadata(newLegacyPlayerInfo.mediaMetadataCompat, ratingType);
        } else if (!hasMediaMetadataCompat && isCurrentActiveQueueIdChanged) {
            mediaMetadata = (currentMediaItemIndex == C.INDEX_UNSET) ? MediaMetadata.EMPTY : MediaUtils.convertToMediaMetadata(newLegacyPlayerInfo.queue.get(currentMediaItemIndex).getDescription(), ratingType);
        } else {
            mediaMetadata = oldControllerInfo.playerInfo.mediaMetadata;
        }
        if (currentMediaItemIndex == C.INDEX_UNSET && isMetadataCompatChanged) {
            if (hasMediaMetadataCompat) {
                Log.w(TAG, "Adding a fake MediaItem at the end of the list because there's no QueueItem with" + " the active queue id and current Timeline should have currently playing" + " MediaItem.");
                MediaItem fakeMediaItem = MediaUtils.convertToMediaItem(newLegacyPlayerInfo.mediaMetadataCompat, ratingType);
                currentTimeline = currentTimeline.copyWithFakeMediaItem(fakeMediaItem);
                currentMediaItemIndex = currentTimeline.getWindowCount() - 1;
            } else {
                currentTimeline = currentTimeline.copyWithFakeMediaItem(/* fakeMediaItem= */
                null);
                // Shouldn't be C.INDEX_UNSET to make getCurrentMediaItemIndex() return masked index.
                // In other words, this index is either the currently playing media item index or the
                // would-be playing index when playing.
                currentMediaItemIndex = 0;
            }
        } else if (currentMediaItemIndex != C.INDEX_UNSET) {
            currentTimeline = currentTimeline.copyWithFakeMediaItem(/* fakeMediaItem= */
            null);
            if (hasMediaMetadataCompat) {
                MediaItem mediaItem = MediaUtils.convertToMediaItem(currentTimeline.getMediaItemAt(currentMediaItemIndex).mediaId, newLegacyPlayerInfo.mediaMetadataCompat, ratingType);
                currentTimeline = currentTimeline.copyWithNewMediaItem(/* replaceIndex= */
                currentMediaItemIndex, mediaItem);
            }
        } else {
            // There's queue, but no valid queue item ID nor current media item metadata.
            // Fallback to use 0 as current media item index to mask current item index.
            currentMediaItemIndex = 0;
        }
    } else {
        currentMediaItemIndex = oldControllerInfo.playerInfo.sessionPositionInfo.positionInfo.mediaItemIndex;
        mediaMetadata = oldControllerInfo.playerInfo.mediaMetadata;
    }
    playlistMetadata = oldLegacyPlayerInfo.queueTitle == newLegacyPlayerInfo.queueTitle ? oldControllerInfo.playerInfo.playlistMetadata : MediaUtils.convertToMediaMetadata(newLegacyPlayerInfo.queueTitle);
    repeatMode = MediaUtils.convertToRepeatMode(newLegacyPlayerInfo.repeatMode);
    shuffleModeEnabled = MediaUtils.convertToShuffleModeEnabled(newLegacyPlayerInfo.shuffleMode);
    if (oldLegacyPlayerInfo.playbackStateCompat != newLegacyPlayerInfo.playbackStateCompat) {
        availableSessionCommands = MediaUtils.convertToSessionCommands(newLegacyPlayerInfo.playbackStateCompat, isSessionReady);
        customLayout = MediaUtils.convertToCustomLayout(newLegacyPlayerInfo.playbackStateCompat);
    } else {
        availableSessionCommands = oldControllerInfo.availableSessionCommands;
        customLayout = oldControllerInfo.customLayout;
    }
    // Note: Sets the available player command here although it can be obtained before session is
    // ready. It's to follow the decision on MediaController to disallow any commands before
    // connection is made.
    availablePlayerCommands = (oldControllerInfo.availablePlayerCommands == Commands.EMPTY) ? MediaUtils.convertToPlayerCommands(sessionFlags, isSessionReady) : oldControllerInfo.availablePlayerCommands;
    PlaybackException playerError = MediaUtils.convertToPlaybackException(newLegacyPlayerInfo.playbackStateCompat);
    long durationMs = MediaUtils.convertToDurationMs(newLegacyPlayerInfo.mediaMetadataCompat);
    long currentPositionMs = MediaUtils.convertToCurrentPositionMs(newLegacyPlayerInfo.playbackStateCompat, newLegacyPlayerInfo.mediaMetadataCompat, timeDiffMs);
    long bufferedPositionMs = MediaUtils.convertToBufferedPositionMs(newLegacyPlayerInfo.playbackStateCompat, newLegacyPlayerInfo.mediaMetadataCompat, timeDiffMs);
    int bufferedPercentage = MediaUtils.convertToBufferedPercentage(newLegacyPlayerInfo.playbackStateCompat, newLegacyPlayerInfo.mediaMetadataCompat, timeDiffMs);
    long totalBufferedDurationMs = MediaUtils.convertToTotalBufferedDurationMs(newLegacyPlayerInfo.playbackStateCompat, newLegacyPlayerInfo.mediaMetadataCompat, timeDiffMs);
    boolean isPlayingAd = MediaUtils.convertToIsPlayingAd(newLegacyPlayerInfo.mediaMetadataCompat);
    PlaybackParameters playbackParameters = MediaUtils.convertToPlaybackParameters(newLegacyPlayerInfo.playbackStateCompat);
    AudioAttributes audioAttributes = MediaUtils.convertToAudioAttributes(newLegacyPlayerInfo.playbackInfoCompat);
    boolean playWhenReady = MediaUtils.convertToPlayWhenReady(newLegacyPlayerInfo.playbackStateCompat);
    @State int playbackState = MediaUtils.convertToPlaybackState(newLegacyPlayerInfo.playbackStateCompat, newLegacyPlayerInfo.mediaMetadataCompat, timeDiffMs);
    boolean isPlaying = MediaUtils.convertToIsPlaying(newLegacyPlayerInfo.playbackStateCompat);
    DeviceInfo deviceInfo = MediaUtils.convertToDeviceInfo(newLegacyPlayerInfo.playbackInfoCompat);
    int deviceVolume = MediaUtils.convertToDeviceVolume(newLegacyPlayerInfo.playbackInfoCompat);
    boolean deviceMuted = MediaUtils.convertToIsDeviceMuted(newLegacyPlayerInfo.playbackInfoCompat);
    long seekBackIncrementMs = oldControllerInfo.playerInfo.seekBackIncrementMs;
    long seekForwardIncrementMs = oldControllerInfo.playerInfo.seekForwardIncrementMs;
    return createControllerInfo(currentTimeline, mediaMetadata, currentMediaItemIndex, playlistMetadata, repeatMode, shuffleModeEnabled, availableSessionCommands, availablePlayerCommands, customLayout, playerError, durationMs, currentPositionMs, bufferedPositionMs, bufferedPercentage, totalBufferedDurationMs, isPlayingAd, playbackParameters, audioAttributes, playWhenReady, playbackState, isPlaying, deviceInfo, deviceVolume, deviceMuted, seekBackIncrementMs, seekForwardIncrementMs);
}
Also used : PlaybackException(androidx.media3.common.PlaybackException) AudioAttributes(androidx.media3.common.AudioAttributes) RepeatMode(androidx.media3.common.Player.RepeatMode) MediaItem(androidx.media3.common.MediaItem) State(androidx.media3.common.Player.State) Commands(androidx.media3.common.Player.Commands) DeviceInfo(androidx.media3.common.DeviceInfo) MediaMetadata(androidx.media3.common.MediaMetadata) PlaybackParameters(androidx.media3.common.PlaybackParameters)

Example 4 with PlaybackException

use of androidx.media3.common.PlaybackException in project media by androidx.

the class MediaControllerImplLegacy method createControllerInfo.

private static ControllerInfo createControllerInfo(QueueTimeline currentTimeline, MediaMetadata mediaMetadata, int currentMediaItemIndex, MediaMetadata playlistMetadata, @RepeatMode int repeatMode, boolean shuffleModeEnabled, SessionCommands availableSessionCommands, Commands availablePlayerCommands, ImmutableList<CommandButton> customLayout, @Nullable PlaybackException playerError, long durationMs, long currentPositionMs, long bufferedPositionMs, int bufferedPercentage, long totalBufferedDurationMs, boolean isPlayingAd, PlaybackParameters playbackParameters, AudioAttributes audioAttributes, boolean playWhenReady, int playbackState, boolean isPlaying, DeviceInfo deviceInfo, int deviceVolume, boolean deviceMuted, long seekBackIncrementMs, long seekForwardIncrementMs) {
    @Nullable MediaItem currentMediaItem = currentTimeline.getMediaItemAt(currentMediaItemIndex);
    PositionInfo positionInfo = createPositionInfo(currentMediaItemIndex, currentMediaItem, currentPositionMs);
    SessionPositionInfo sessionPositionInfo = new SessionPositionInfo(/* positionInfo= */
    positionInfo, /* isPlayingAd= */
    isPlayingAd, /* eventTimeMs= */
    C.TIME_UNSET, /* durationMs= */
    durationMs, /* bufferedPositionMs= */
    bufferedPositionMs, /* bufferedPercentage= */
    bufferedPercentage, /* totalBufferedDurationMs= */
    totalBufferedDurationMs, /* currentLiveOffsetMs= */
    C.TIME_UNSET, /* contentDurationMs= */
    durationMs, /* contentBufferedPositionMs= */
    bufferedPositionMs);
    PlayerInfo playerInfo = new PlayerInfo(/* playerError= */
    playerError, /* mediaItemTransitionReason= */
    PlayerInfo.MEDIA_ITEM_TRANSITION_REASON_DEFAULT, /* sessionPositionInfo= */
    sessionPositionInfo, /* oldPositionInfo= */
    SessionPositionInfo.DEFAULT_POSITION_INFO, /* newPositionInfo= */
    SessionPositionInfo.DEFAULT_POSITION_INFO, /* discontinuityReason= */
    PlayerInfo.DISCONTINUITY_REASON_DEFAULT, /* playbackParameters= */
    playbackParameters, /* repeatMode= */
    repeatMode, /* shuffleModeEnabled= */
    shuffleModeEnabled, /* videoSize= */
    VideoSize.UNKNOWN, /* timeline= */
    currentTimeline, /* playlistMetadata= */
    playlistMetadata, /* volume= */
    1.0f, /* audioAttributes= */
    audioAttributes, /* cues= */
    Collections.emptyList(), /* deviceInfo= */
    deviceInfo, /* deviceVolume= */
    deviceVolume, /* deviceMuted= */
    deviceMuted, /* playWhenReady= */
    playWhenReady, /* playWhenReadyChangedReason= */
    PlayerInfo.PLAY_WHEN_READY_CHANGE_REASON_DEFAULT, /* playbackSuppressionReason= */
    Player.PLAYBACK_SUPPRESSION_REASON_NONE, /* playbackState= */
    playbackState, /* isPlaying= */
    isPlaying, /* isLoading= */
    false, /* mediaMetadata= */
    mediaMetadata, seekBackIncrementMs, seekForwardIncrementMs, /* maxSeekToPreviousPositionMs= */
    0L, /* parameters= */
    TrackSelectionParameters.DEFAULT_WITHOUT_CONTEXT);
    return new ControllerInfo(playerInfo, availableSessionCommands, availablePlayerCommands, customLayout);
}
Also used : MediaItem(androidx.media3.common.MediaItem) PositionInfo(androidx.media3.common.Player.PositionInfo) Nullable(androidx.annotation.Nullable)

Example 5 with PlaybackException

use of androidx.media3.common.PlaybackException in project media by androidx.

the class MediaControllerCompatCallbackWithMediaSessionTest method getError_withPlayerErrorAfterConnected_returnsError.

@Test
public void getError_withPlayerErrorAfterConnected_returnsError() throws Exception {
    PlaybackException testPlayerError = new PlaybackException(/* messaage= */
    "testremote", /* cause= */
    null, PlaybackException.ERROR_CODE_REMOTE_ERROR);
    Bundle playerConfig = new RemoteMediaSession.MockPlayerConfigBuilder().setPlayerError(testPlayerError).build();
    session.setPlayer(playerConfig);
    MediaControllerCompat controller = new MediaControllerCompat(context, session.getCompatToken());
    CountDownLatch latch = new CountDownLatch(1);
    controller.registerCallback(new MediaControllerCompat.Callback() {

        @Override
        public void onSessionReady() {
            latch.countDown();
        }
    }, handler);
    assertThat(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue();
    assertPlaybackStateCompatErrorEquals(controller.getPlaybackState(), testPlayerError);
}
Also used : PlaybackException(androidx.media3.common.PlaybackException) Bundle(android.os.Bundle) MediaControllerCompat(android.support.v4.media.session.MediaControllerCompat) CountDownLatch(java.util.concurrent.CountDownLatch) LargeTest(androidx.test.filters.LargeTest) Test(org.junit.Test)

Aggregations

PlaybackException (androidx.media3.common.PlaybackException)20 Test (org.junit.Test)12 Nullable (androidx.annotation.Nullable)9 AtomicReference (java.util.concurrent.atomic.AtomicReference)9 LargeTest (androidx.test.filters.LargeTest)7 CountDownLatch (java.util.concurrent.CountDownLatch)7 Bundle (android.os.Bundle)5 Player (androidx.media3.common.Player)5 MediaItem (androidx.media3.common.MediaItem)4 ExoPlaybackException (androidx.media3.exoplayer.ExoPlaybackException)4 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)4 Timeline (androidx.media3.common.Timeline)3 MediaControllerCompat (android.support.v4.media.session.MediaControllerCompat)2 PlaybackStateCompat (android.support.v4.media.session.PlaybackStateCompat)2 AudioAttributes (androidx.media3.common.AudioAttributes)2 DeviceInfo (androidx.media3.common.DeviceInfo)2 MediaMetadata (androidx.media3.common.MediaMetadata)2 PlaybackParameters (androidx.media3.common.PlaybackParameters)2 PositionInfo (androidx.media3.common.Player.PositionInfo)2 State (androidx.media3.common.Player.State)2