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) {
0 -> handlePause();
1 -> {
if(!(video?.isLive ?: false) && Settings.instance.playback.backgroundSwitchToAudio)
_player.switchToAudioMode();
if (video?.isLive != true && Settings.instance.playback.backgroundSwitchToAudio && _lastVideoSource !== null) {
_player.switchToAudioMode()
}
StatePlayer.instance.startOrUpdateMediaSession(context, video);
}
}