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 27 matching lines...) Expand all Loading... |
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]; | 47 ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init]; |
48 NSString* videoCodec = [settingsModel currentVideoCodecSettingFromStore]; | |
49 _delegate = delegate; | 48 _delegate = delegate; |
50 _client = [[ARDAppClient alloc] initWithDelegate:self | 49 _client = [[ARDAppClient alloc] initWithDelegate:self]; |
51 preferVideoCodec:videoCodec]; | |
52 RTCMediaConstraints *cameraConstraints = [[RTCMediaConstraints alloc] | |
53 initWithMandatoryConstraints:nil | |
54 optionalConstraints:[settingsModel | |
55 currentMediaConstraintFromStoreAsRTCDic
tionary]]; | |
56 [_client setMaxBitrate:[settingsModel currentMaxBitrateSettingFromStore]]; | |
57 [_client setCameraConstraints:cameraConstraints]; | |
58 [_client connectToRoomWithId:room | 50 [_client connectToRoomWithId:room |
| 51 settings:settingsModel |
59 isLoopback:isLoopback | 52 isLoopback:isLoopback |
60 isAudioOnly:isAudioOnly | 53 isAudioOnly:isAudioOnly |
61 shouldMakeAecDump:shouldMakeAecDump | 54 shouldMakeAecDump:shouldMakeAecDump |
62 shouldUseLevelControl:shouldUseLevelControl]; | 55 shouldUseLevelControl:shouldUseLevelControl]; |
63 } | 56 } |
64 return self; | 57 return self; |
65 } | 58 } |
66 | 59 |
67 - (void)loadView { | 60 - (void)loadView { |
68 _videoCallView = [[ARDVideoCallView alloc] initWithFrame:CGRectZero]; | 61 _videoCallView = [[ARDVideoCallView alloc] initWithFrame:CGRectZero]; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 - (void)showAlertWithMessage:(NSString*)message { | 216 - (void)showAlertWithMessage:(NSString*)message { |
224 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil | 217 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil |
225 message:message | 218 message:message |
226 delegate:nil | 219 delegate:nil |
227 cancelButtonTitle:@"OK" | 220 cancelButtonTitle:@"OK" |
228 otherButtonTitles:nil]; | 221 otherButtonTitles:nil]; |
229 [alertView show]; | 222 [alertView show]; |
230 } | 223 } |
231 | 224 |
232 @end | 225 @end |
OLD | NEW |