| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 @synthesize videoCallView = _videoCallView; | 37 @synthesize videoCallView = _videoCallView; |
| 38 @synthesize delegate = _delegate; | 38 @synthesize delegate = _delegate; |
| 39 | 39 |
| 40 - (instancetype)initForRoom:(NSString *)room | 40 - (instancetype)initForRoom:(NSString *)room |
| 41 isLoopback:(BOOL)isLoopback | 41 isLoopback:(BOOL)isLoopback |
| 42 isAudioOnly:(BOOL)isAudioOnly | 42 isAudioOnly:(BOOL)isAudioOnly |
| 43 shouldMakeAecDump:(BOOL)shouldMakeAecDump | 43 shouldMakeAecDump:(BOOL)shouldMakeAecDump |
| 44 shouldUseLevelControl:(BOOL)shouldUseLevelControl | 44 shouldUseLevelControl:(BOOL)shouldUseLevelControl |
| 45 delegate:(id<ARDVideoCallViewControllerDelegate>)delegate { | 45 delegate:(id<ARDVideoCallViewControllerDelegate>)delegate { |
| 46 if (self = [super init]) { | 46 if (self = [super init]) { |
| 47 ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init]; |
| 48 NSString* videoCodec = [settingsModel currentVideoCodecSettingFromStore]; |
| 47 _delegate = delegate; | 49 _delegate = delegate; |
| 48 _client = [[ARDAppClient alloc] initWithDelegate:self]; | 50 _client = [[ARDAppClient alloc] initWithDelegate:self |
| 49 ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init]; | 51 preferVideoCodec:videoCodec]; |
| 50 RTCMediaConstraints *cameraConstraints = [[RTCMediaConstraints alloc] | 52 RTCMediaConstraints *cameraConstraints = [[RTCMediaConstraints alloc] |
| 51 initWithMandatoryConstraints:nil | 53 initWithMandatoryConstraints:nil |
| 52 optionalConstraints:[settingsModel | 54 optionalConstraints:[settingsModel |
| 53 currentMediaConstraintFromStoreAsRTCDic
tionary]]; | 55 currentMediaConstraintFromStoreAsRTCDic
tionary]]; |
| 54 [_client setMaxBitrate:[settingsModel currentMaxBitrateSettingFromStore]]; | 56 [_client setMaxBitrate:[settingsModel currentMaxBitrateSettingFromStore]]; |
| 55 [_client setCameraConstraints:cameraConstraints]; | 57 [_client setCameraConstraints:cameraConstraints]; |
| 56 [_client connectToRoomWithId:room | 58 [_client connectToRoomWithId:room |
| 57 isLoopback:isLoopback | 59 isLoopback:isLoopback |
| 58 isAudioOnly:isAudioOnly | 60 isAudioOnly:isAudioOnly |
| 59 shouldMakeAecDump:shouldMakeAecDump | 61 shouldMakeAecDump:shouldMakeAecDump |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 - (void)showAlertWithMessage:(NSString*)message { | 223 - (void)showAlertWithMessage:(NSString*)message { |
| 222 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil | 224 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil |
| 223 message:message | 225 message:message |
| 224 delegate:nil | 226 delegate:nil |
| 225 cancelButtonTitle:@"OK" | 227 cancelButtonTitle:@"OK" |
| 226 otherButtonTitles:nil]; | 228 otherButtonTitles:nil]; |
| 227 [alertView show]; | 229 [alertView show]; |
| 228 } | 230 } |
| 229 | 231 |
| 230 @end | 232 @end |
| OLD | NEW |