From c45c662a96f94edd6b73def5647e35ee7b7e3fab Mon Sep 17 00:00:00 2001 From: hawkinslabdev <59891413+hawkinslabdev@users.noreply.github.com> Date: Sat, 31 Oct 2026 18:56:06 +0100 Subject: [PATCH] Request audio focus for video playback so background music pauses (#2151) ## Description The video player passes false to setAudioAttributes (since #1258 I think), as ExoPlayer never requests audio focus. This will pass `true`. ### Related issues #447, #1258. ### Testing Not tested on a device. ### Screenshots Not applicable ### AI or LLM usage None. --------- Co-authored-by: Damontecres --- .../com/github/damontecres/wholphin/services/PlayerFactory.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/services/PlayerFactory.kt b/app/src/main/java/com/github/damontecres/wholphin/services/PlayerFactory.kt index ff1309fc..d61c02ce 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/services/PlayerFactory.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/services/PlayerFactory.kt @@ -182,8 +182,9 @@ class PlayerFactory AudioAttributes .Builder() .setContentType(C.AUDIO_CONTENT_TYPE_MOVIE) + .setUsage(C.USAGE_MEDIA) .build(), - false, + true, ) } }