diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 126cb54cac..9f6e28f11f 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -78,7 +78,7 @@ jobs: -scheme BareExample \ -sdk iphonesimulator \ -configuration Debug \ - -destination 'platform=iOS Simulator,name=iPhone 14' \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ build \ CODE_SIGNING_ALLOWED=NO | xcpretty" @@ -142,7 +142,7 @@ jobs: -scheme BareExample \ -sdk iphonesimulator \ -configuration Debug \ - -destination 'platform=iOS Simulator,name=iPhone 14' \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ build \ CODE_SIGNING_ALLOWED=NO | xcpretty" @@ -209,6 +209,6 @@ jobs: -scheme BareExample \ -sdk iphonesimulator \ -configuration Debug \ - -destination 'platform=iOS Simulator,name=iPhone 14' \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ build \ - CODE_SIGNING_ALLOWED=NO | xcpretty" \ No newline at end of file + CODE_SIGNING_ALLOWED=NO | xcpretty" diff --git a/ios/Video/AudioSessionManager.swift b/ios/Video/AudioSessionManager.swift index da047820f2..9df1d5c85f 100644 --- a/ios/Video/AudioSessionManager.swift +++ b/ios/Video/AudioSessionManager.swift @@ -152,14 +152,16 @@ class AudioSessionManager { return view._mixWithOthers == "mix" || view._mixWithOthers == "duck" } - let canAllowMixing = anyPlayerWantsMixing || (!anyPlayerShowNotificationControls && !anyPlayerNeedsBackgroundPlayback) + let anyPlayerUsesNotificationControlFeature = anyPlayerShowNotificationControls && anyPlayerNeedsBackgroundPlayback + + let canAllowMixing = anyPlayerWantsMixing || !anyPlayerUsesNotificationControlFeature if isAudioSessionManagementDisabled { // AUDIO SESSION MANAGEMENT DISABLED BY USER return } - if !anyPlayerPlaying { + if !anyPlayerPlaying && !anyPlayerUsesNotificationControlFeature { options.insert(.mixWithOthers) } else if canAllowMixing { let shouldEnableMixing = videoViews.allObjects.contains { view in diff --git a/ios/Video/Features/RCTPictureInPicture.swift b/ios/Video/Features/RCTPictureInPicture.swift index 21d321a2ac..dfc3cf06c9 100644 --- a/ios/Video/Features/RCTPictureInPicture.swift +++ b/ios/Video/Features/RCTPictureInPicture.swift @@ -6,7 +6,7 @@ import React #if os(iOS) class RCTPictureInPicture: NSObject, AVPictureInPictureControllerDelegate { - public private(set) var _pipController: AVPictureInPictureController? + private(set) var _pipController: AVPictureInPictureController? private var _onPictureInPictureEnter: (() -> Void)? private var _onPictureInPictureExit: (() -> Void)? private var _onRestoreUserInterfaceForPictureInPictureStop: (() -> Void)? @@ -92,7 +92,7 @@ import React } #else class RCTPictureInPicture: NSObject { - public let _pipController: NSObject? = nil + let _pipController: NSObject? = nil func setRestoreUserInterfaceForPIPStopCompletionHandler(_: Bool) {} func setupPipController(_: AVPlayerLayer?) {} diff --git a/ios/Video/NowPlayingInfoCenterManager.swift b/ios/Video/NowPlayingInfoCenterManager.swift index 7c542122fc..a52e930e33 100644 --- a/ios/Video/NowPlayingInfoCenterManager.swift +++ b/ios/Video/NowPlayingInfoCenterManager.swift @@ -81,7 +81,7 @@ class NowPlayingInfoCenterManager { } } - public func cleanup() { + func cleanup() { observers.removeAll() players.removeAllObjects() @@ -199,7 +199,7 @@ class NowPlayingInfoCenterManager { remoteCommandCenter.togglePlayPauseCommand.removeTarget(togglePlayPauseTarget) } - public func updateNowPlayingInfo() { + func updateNowPlayingInfo() { guard let player = currentPlayer, let currentItem = player.currentItem else { invalidateCommandTargets() MPNowPlayingInfoCenter.default().nowPlayingInfo = [:]