mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-11-06 18:54:49 +01:00
Pause music playback when another app takes audio focus (#1842)
## Description The audio player passed handleAudioFocus = false when setting its audio attributes, so ExoPlayer never requested audio focus. Music kept playing and mixed with other audio when a call arrived, another app started playback, or voice search took focus. ### Related issues Fixes https://github.com/damontecres/Wholphin/issues/1841 ### Testing 1. Play a music track 2. Open YouTube and play a video ## AI or LLM usage Cursor and Claude Code
This commit is contained in:
parent
f89d752d2c
commit
197af604d6
1 changed files with 2 additions and 1 deletions
|
|
@ -202,9 +202,10 @@ class PlayerFactory
|
||||||
it.setAudioAttributes(
|
it.setAudioAttributes(
|
||||||
AudioAttributes
|
AudioAttributes
|
||||||
.Builder()
|
.Builder()
|
||||||
|
.setUsage(C.USAGE_MEDIA)
|
||||||
.setContentType(C.AUDIO_CONTENT_TYPE_MUSIC)
|
.setContentType(C.AUDIO_CONTENT_TYPE_MUSIC)
|
||||||
.build(),
|
.build(),
|
||||||
false,
|
true,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue