ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Ability to disable the default error alert dialog

Open RybakovSemyon opened this issue 3 years ago • 1 comments

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.

RybakovSemyon avatar Jul 13 '22 16:07 RybakovSemyon

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.

marcbaechinger avatar Jul 13 '22 17:07 marcbaechinger