Do not request audio focus if the played video has no audio
@tonihei is already working on this.
Since Oct 16, 2023.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Use case description
When setting up exoplayer by calling ExoPlayer.setAudioAttributes(...) with handleAudioFocus set to true, the audio focus is always requested even when the video file contains no audio tracks or all audio tracks have been disabled.
This means that the burden of deciding whether the audio focus should really be requested or not is on the application, which would then need to inspect the content of the video file.
Proposed solution
When handleAudioFocus==true, Exoplayer should NOT actually request the audio focus when either the video contains no audio tracks or when all audio tracks have been disabled.
Alternatives considered
Rename handleAudioFocus argument to requestAudioFocus to at least make expectations clearer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.