From 3576a134e678e6273d9195d7a17c9828c30426e2 Mon Sep 17 00:00:00 2001 From: Lukas <38685058+lukasjengo@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:23:53 +0300 Subject: [PATCH] feat: allow audio mixing if one of the video views require it (#4559) --- ios/Video/AudioSessionManager.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ios/Video/AudioSessionManager.swift b/ios/Video/AudioSessionManager.swift index c9fa362e..17c4a151 100644 --- a/ios/Video/AudioSessionManager.swift +++ b/ios/Video/AudioSessionManager.swift @@ -139,7 +139,11 @@ class AudioSessionManager { return view._playInBackground } - let canAllowMixing = !anyPlayerShowNotificationControls && !anyPlayerNeedsBackgroundPlayback + let anyPlayerWantsMixing = videoViews.allObjects.contains { view in + return view._mixWithOthers == "mix" || view._mixWithOthers == "duck" + } + + let canAllowMixing = anyPlayerWantsMixing || (!anyPlayerShowNotificationControls && !anyPlayerNeedsBackgroundPlayback) if isAudioSessionManagementDisabled { // AUDIO SESSION MANAGEMENT DISABLED BY USER