From a0450e026c76c004125b27a0329248e2b2b6257c Mon Sep 17 00:00:00 2001 From: lrusso Date: Wed, 30 Aug 2023 01:43:22 -0300 Subject: [PATCH] activating the audio session --- ios/Video/RCTVideo.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 43eec0e7..406a0c66 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -127,6 +127,12 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH _eventDispatcher = eventDispatcher #if os(iOS) + let audioSession = AVAudioSession.sharedInstance() + do { + try audioSession.setCategory(.playback) + try audioSession.setActive(true, options: []) + } catch { + } _pip = RCTPictureInPicture(self._onPictureInPictureStatusChanged, self._onRestoreUserInterfaceForPictureInPictureStop) #endif