google / google/ExoPlayer

Playback state with AUDIO_FOCUS_LOSS_TRANSIENT

Open
#10,140 2 comments 0 reactions 1 assignee Claimed by @marcbaechinger View on GitHub
question
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

When ExoPlayer(r2.17.1) receives `AUDIO_FOCUS_LOSS_TRANSIENT`, the playback is suppressed with `PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS`, but the playbackSate is still "playing" (not "paused").
Is this the correct behaviour? Since from the notification player and app, it may look like the player is still playing (pause icon) but it actually is not playing.
A lot of users are confused by this and think that our player continues playing when receiving a call.
If it is intended behaviour, is there a way of pausing when suppressed without having to implement my own AudioFocusChangeListener?
Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.