From fc2369698f0f7e1ea7231c57691449b3ce4daa21 Mon Sep 17 00:00:00 2001 From: Ratson Date: Thu, 28 Oct 2021 00:22:45 +0800 Subject: [PATCH] fix(ios): keep media playing when record --- src/ios/CDVSound.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVSound.m b/src/ios/CDVSound.m index d63b0ab2d..987a25870 100644 --- a/src/ios/CDVSound.m +++ b/src/ios/CDVSound.m @@ -677,7 +677,7 @@ - (void)startRecordingAudio:(CDVInvokedUrlCommand*)command // get the audioSession and set the category to allow recording when device is locked or ring/silent switch engaged if ([weakSelf hasAudioSession]) { if (![weakSelf.avSession.category isEqualToString:AVAudioSessionCategoryPlayAndRecord]) { - [weakSelf.avSession setCategory:AVAudioSessionCategoryRecord error:nil]; + [weakSelf.avSession setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; } if (![weakSelf.avSession setActive:YES error:&error]) {