fix(ios): workaround accidental breaking change (#2024)

v1.6.0 introduced an accidental breaking change which resulted in videos being recorded without audio.

Closes #2029
This commit is contained in:
Laurin Quast 2019-01-08 11:15:52 +01:00 committed by GitHub
parent 5e5da25276
commit 4bdcbd372e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,8 +531,9 @@ static NSDictionary *defaultFaceDetectorOptions = nil;
}
}
if ([options valueForKey:@"mute"] != nil) {
[self updateSessionAudioIsMuted:[options[@"mute"] boolValue]];
// only update audio session when mute is not set or set to false, because otherwise there will be a flickering
if ([options valueForKey:@"mute"] == nil || ([options valueForKey:@"mute"] != nil && ![options[@"mute"] boolValue])) {
[self updateSessionAudioIsMuted:NO];
}
AVCaptureConnection *connection = [self.movieFileOutput connectionWithMediaType:AVMediaTypeVideo];