Skip to content

[Cast] NullPointerException when CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID is used #3174

@TomasValenta

Description

@TomasValenta

Version

Media3 1.10.0

More version details

No response

Devices that reproduce the issue

Any

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. In CastOptions Builder Change DefaultCastOptionsProvider.APP_ID_DEFAULT_RECEIVER_WITH_DRM to gms default CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID
  2. Connect to Cast device with MediaRouteButton
  3. Disconnect

Expected result

The same as with DefaultCastOptionsProvider.APP_ID_DEFAULT_RECEIVER_WITH_DRM

Actual result

java.lang.NullPointerException
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:904)
    at androidx.media3.exoplayer.source.DefaultMediaSourceFactory.createMediaSource(DefaultMediaSourceFactory.java:534)
    at androidx.media3.exoplayer.ExoPlayerImpl.createMediaSources(ExoPlayerImpl.java:2191)
    at androidx.media3.exoplayer.ExoPlayerImpl.setMediaItems(ExoPlayerImpl.java:627)
    at androidx.media3.common.PlayerTransferState.setToPlayer(PlayerTransferState.java:249)
    at androidx.media3.cast.CastPlayer$TransferCallback.lambda$static$0(CastPlayer.java:66)
    at androidx.media3.cast.CastPlayer$TransferCallback$$ExternalSyntheticLambda0.transferState(D8$$SyntheticClass:0)
    at androidx.media3.cast.CastPlayerImpl.updateActivePlayer(CastPlayerImpl.java:58)
    at androidx.media3.cast.CastPlayerImpl.access$100(CastPlayerImpl.java:32)
    at androidx.media3.cast.CastPlayerImpl$SessionAvailabilityListenerImpl.onCastSessionUnavailable(CastPlayerImpl.java:103)
    at androidx.media3.cast.RemoteCastPlayer.setCastSession(RemoteCastPlayer.java:1800)
    at androidx.media3.cast.RemoteCastPlayer.access$2100(RemoteCastPlayer.java:111)
    at androidx.media3.cast.RemoteCastPlayer$StatusListener.onSessionEnding(RemoteCastPlayer.java:1993)
    at androidx.media3.cast.RemoteCastPlayer$StatusListener.onSessionEnding(RemoteCastPlayer.java:1904)

Media

Any (tested with Media3 Session Demo audio media)?

Bug Report

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions