From 7ef087a16b2fa1d247f2a008d848db3f861835a9 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 8 Feb 2024 14:11:37 +1100 Subject: [PATCH 1/2] Correctly setting the audio session category before playing attachments --- Session/Conversations/ConversationVC+Interaction.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index 55f7ca937..7bc92ab0f 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -963,6 +963,9 @@ extension ConversationVC: FileManager.default.fileExists(atPath: originalFilePath) else { return SNLog("Missing video file") } + /// When playing media we need to change the AVAudioSession to 'playback' mode so the device "silent mode" + /// doesn't prevent video audio from playing + try? AVAudioSession.sharedInstance().setCategory(.playback) let viewController: AVPlayerViewController = AVPlayerViewController() viewController.player = AVPlayer(url: URL(fileURLWithPath: originalFilePath)) self.navigationController?.present(viewController, animated: true) @@ -1006,7 +1009,9 @@ extension ConversationVC: let originalFilePath: String = attachment.originalFilePath else { return } - // Use the native player to play audio files + /// When playing media we need to change the AVAudioSession to 'playback' mode so the device "silent mode" + /// doesn't prevent video audio from playing + try? AVAudioSession.sharedInstance().setCategory(.playback) let viewController: AVPlayerViewController = AVPlayerViewController() viewController.player = AVPlayer(url: URL(fileURLWithPath: originalFilePath)) self.navigationController?.present(viewController, animated: true) From a98a56ee6c56791c9401856adc0cda0f041912e3 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 27 Mar 2024 10:45:41 +1100 Subject: [PATCH 2/2] Updated to a specific SignalCoreKit commit hash (remove OWSFailDebug calls) --- Podfile | 2 +- Podfile.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Podfile b/Podfile index fa7c008fb..f7c3a36e0 100644 --- a/Podfile +++ b/Podfile @@ -33,7 +33,7 @@ abstract_target 'GlobalDependencies' do # Dependencies to be included only in all extensions/frameworks abstract_target 'FrameworkAndExtensionDependencies' do pod 'Curve25519Kit', git: 'https://github.com/oxen-io/session-ios-curve-25519-kit.git', branch: 'session-version' - pod 'SignalCoreKit', git: 'https://github.com/oxen-io/session-ios-core-kit', branch: 'session-version' + pod 'SignalCoreKit', git: 'https://github.com/oxen-io/session-ios-core-kit', :commit => '3acbfe5' target 'SessionNotificationServiceExtension' target 'SessionSnodeKit' diff --git a/Podfile.lock b/Podfile.lock index 36d1cf066..30631cbff 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -29,7 +29,7 @@ PODS: - NVActivityIndicatorView (5.1.1): - NVActivityIndicatorView/Base (= 5.1.1) - NVActivityIndicatorView/Base (5.1.1) - - OpenSSL-Universal (1.1.1300) + - OpenSSL-Universal (1.1.2200) - PureLayout (3.1.9) - Quick (7.3.0) - Reachability (3.2) @@ -60,7 +60,7 @@ DEPENDENCIES: - Quick - Reachability - SAMKeychain - - SignalCoreKit (from `https://github.com/oxen-io/session-ios-core-kit`, branch `session-version`) + - SignalCoreKit (from `https://github.com/oxen-io/session-ios-core-kit`, commit `3acbfe5`) - Sodium (from `https://github.com/oxen-io/session-ios-swift-sodium.git`, branch `session-build`) - SQLCipher (~> 4.5.3) - SwiftProtobuf (~> 1.5.0) @@ -89,7 +89,7 @@ EXTERNAL SOURCES: :branch: session-version :git: https://github.com/oxen-io/session-ios-curve-25519-kit.git SignalCoreKit: - :branch: session-version + :commit: 3acbfe5 :git: https://github.com/oxen-io/session-ios-core-kit Sodium: :branch: session-build @@ -102,7 +102,7 @@ CHECKOUT OPTIONS: :commit: ee1bc83e61d9d672105eed85a4b8fbaec3d376f5 :git: https://github.com/oxen-io/session-ios-curve-25519-kit.git SignalCoreKit: - :commit: 4590c2737a2b5dc0ef4ace9f9019b581caccc1de + :commit: 3acbfe5 :git: https://github.com/oxen-io/session-ios-core-kit Sodium: :commit: 4ecfe2ddfd75e7b396c57975b4163e5c8cf4d5cc @@ -119,7 +119,7 @@ SPEC CHECKSUMS: libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009 Nimble: f8a8219d16f176429b951e8f7e72df5c23ceddc0 NVActivityIndicatorView: 1f6c5687f1171810aa27a3296814dc2d7dec3667 - OpenSSL-Universal: e7311447fd2419f57420c79524b641537387eff2 + OpenSSL-Universal: 6e1ae0555546e604dbc632a2b9a24a9c46c41ef6 PureLayout: 5fb5e5429519627d60d079ccb1eaa7265ce7cf88 Quick: d32871931c05547cb4e0bc9009d66a18b50d8558 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 @@ -131,6 +131,6 @@ SPEC CHECKSUMS: WebRTC-lib: d83df8976fa608b980f1d85796b3de66d60a1953 YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331 -PODFILE CHECKSUM: 4e88e94d595188c412f739792fb78e0e92a8be12 +PODFILE CHECKSUM: 2c877a533db6e82eaa94407c95be114d80c2f893 COCOAPODS: 1.14.3