Pass settings model to ARDAppClient instead of individual settings.
Moves settings model and related classes to code common for both iOS
and Mac.
BUG=webrtc:7177,webrtc:6494
Review-Url: https://codereview.webrtc.org/2770113004
Cr-Commit-Position: refs/heads/master@{#17408}
diff --git a/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m b/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m
index f58ee66..d1ae3f9 100644
--- a/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m
+++ b/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m
@@ -45,17 +45,10 @@
delegate:(id<ARDVideoCallViewControllerDelegate>)delegate {
if (self = [super init]) {
ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init];
- NSString* videoCodec = [settingsModel currentVideoCodecSettingFromStore];
_delegate = delegate;
- _client = [[ARDAppClient alloc] initWithDelegate:self
- preferVideoCodec:videoCodec];
- RTCMediaConstraints *cameraConstraints = [[RTCMediaConstraints alloc]
- initWithMandatoryConstraints:nil
- optionalConstraints:[settingsModel
- currentMediaConstraintFromStoreAsRTCDictionary]];
- [_client setMaxBitrate:[settingsModel currentMaxBitrateSettingFromStore]];
- [_client setCameraConstraints:cameraConstraints];
+ _client = [[ARDAppClient alloc] initWithDelegate:self];
[_client connectToRoomWithId:room
+ settings:settingsModel
isLoopback:isLoopback
isAudioOnly:isAudioOnly
shouldMakeAecDump:shouldMakeAecDump