prevent switching to audio mode when switching to the background if the player is already play audio only

Changelog: changed
This commit is contained in:
Kai 2025-04-17 15:40:25 -05:00
parent 9347351c37
commit 67e9d44295
No known key found for this signature in database

View File

@ -1090,8 +1090,9 @@ class VideoDetailView : ConstraintLayout {
when (Settings.instance.playback.backgroundPlay) { when (Settings.instance.playback.backgroundPlay) {
0 -> handlePause(); 0 -> handlePause();
1 -> { 1 -> {
if(!(video?.isLive ?: false) && Settings.instance.playback.backgroundSwitchToAudio) if (video?.isLive != true && Settings.instance.playback.backgroundSwitchToAudio && _lastVideoSource !== null) {
_player.switchToAudioMode(); _player.switchToAudioMode()
}
StatePlayer.instance.startOrUpdateMediaSession(context, video); StatePlayer.instance.startOrUpdateMediaSession(context, video);
} }
} }