From 95a2d9c44e8cf5e094e2c13450f9c1145127eb62 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 28 Jun 2026 19:45:41 +0000 Subject: [PATCH] Revert "feat: let ExoPlayer handle audio focus (pause on calls / other media apps)" This reverts commit bce50d1d017683c27ac98c3e6c3da5b4ed301fea. --- .../playback/playerPool/ExoPlayerBuilder.kt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/playerPool/ExoPlayerBuilder.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/playerPool/ExoPlayerBuilder.kt index 0280d36ec6..3a46279de2 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/playerPool/ExoPlayerBuilder.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/playerPool/ExoPlayerBuilder.kt @@ -22,8 +22,6 @@ package com.vitorpamplona.amethyst.service.playback.playerPool import android.content.Context import androidx.annotation.OptIn -import androidx.media3.common.AudioAttributes -import androidx.media3.common.C import androidx.media3.common.MediaItem import androidx.media3.common.Player import androidx.media3.common.util.UnstableApi @@ -69,18 +67,6 @@ class ExoPlayerBuilder( .apply { setMediaSourceFactory(CustomMediaSourceFactory(videoCache, dataSourceFactory)) setLoadControl(feedTunedLoadControl()) - // Let ExoPlayer own audio focus: pause when a call or another media app takes over - // (which flips isPlaying false, so V4V streaming payments stop with it) and duck for - // transient interruptions. USAGE_MEDIA so the system treats it as ordinary playback. - setAudioAttributes( - AudioAttributes - .Builder() - .setUsage(C.USAGE_MEDIA) - .setContentType(C.AUDIO_CONTENT_TYPE_MOVIE) - .build(), - // handleAudioFocus = - true, - ) }.build() .apply { PcmTapRegistry.registerPlayer(this, sink)