From ff50debd370ed2cf92964175b01da3eaabd94da1 Mon Sep 17 00:00:00 2001 From: "tkchin@webrtc.org" Date: Fri, 18 Jul 2014 17:17:59 +0000 Subject: [PATCH] Runtime guard for iOS7 property. BUG=3487 R=glaznev@webrtc.org Review URL: https://webrtc-codereview.appspot.com/19989004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6733 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../modules/video_capture/ios/rtc_video_capture_ios_objc.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm b/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm index 4e334d4cec..ac90b72ad0 100644 --- a/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm +++ b/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm @@ -44,7 +44,10 @@ using namespace webrtc::videocapturemodule; _captureId = captureId; _captureSession = [[AVCaptureSession alloc] init]; #if defined(__IPHONE_7_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0 - _captureSession.usesApplicationAudioSession = NO; + NSString* version = [[UIDevice currentDevice] systemVersion]; + if ([version integerValue] >= 7) { + _captureSession.usesApplicationAudioSession = NO; + } #endif _captureChanging = NO; _captureChangingCondition = [[NSCondition alloc] init];