google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.71k stars 6.02k forks source link

Ability to disable the default error alert dialog #10432

Open RybakovSemyon opened 2 years ago

RybakovSemyon commented 2 years ago

Hello! We have a need not to receive a default alert dialog when a video playback error occurs. This alert dialog appears in the Mediacontrolsview.PlayerCallback class in the public void onPlayerStateChanged(@NonNull PlayerWrapper player, int state) method when state case into switch block = Session Player.PLAYER_STATE_ERROR Is it possible to add a custom setting to skip this alert dialog? We are completely satisfied with the standard implementation of the player and media controller, but we have our own error handling and the alert dialog only confuses our users.

marcbaechinger commented 2 years ago

This is a androidx.media2 component. androidx.media2 is superseded by the androidx.media3 session module that we have released in beta recently. Said this, this enhancement will probably be of low priority I'm afraid. While this is probably not what you wanted to hear, I recommend migrating to media3.

However, in general I think I actually agree that it's a bit weird to have this alert popping up without a way to disable this.

As this is a androidx.media2 API, it would need to follow the release process for AndroidX which means we would have to do the change and then do an official release of androidx.media2 that would include an alpha, beta, rc step until we reach stable. So in any case, after this change is done in the AndroidX repository and then released, it will take a while until it arrives for your use.