Index: webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.m |
diff --git a/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.m b/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.m |
index fb59dd2769b1a9c5eacce912f2e59f24e5fb40eb..7aa69c3ff809caeef2a483da4476b8e343830b81 100644 |
--- a/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.m |
+++ b/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.m |
@@ -14,7 +14,7 @@ |
NS_ASSUME_NONNULL_BEGIN |
typedef NS_ENUM(int, ARDSettingsSections) { |
- ARDSettingsSectionMediaConstraints = 0, |
+ ARDSettingsSectionVideoResolution = 0, |
ARDSettingsSectionVideoCodec, |
ARDSettingsSectionBitRate, |
}; |
@@ -46,9 +46,9 @@ typedef NS_ENUM(int, ARDSettingsSections) { |
- (void)viewWillAppear:(BOOL)animated { |
[super viewWillAppear:animated]; |
- [self addCheckmarkInSection:ARDSettingsSectionMediaConstraints |
- withArray:[self mediaConstraintsArray] |
- selecting:[_settingsModel currentVideoResoultionConstraintFromStore]]; |
+ [self addCheckmarkInSection:ARDSettingsSectionVideoResolution |
+ withArray:[self videoResolutionArray] |
+ selecting:[_settingsModel currentVideoResolutionSettingFromStore]]; |
[self addCheckmarkInSection:ARDSettingsSectionVideoCodec |
withArray:[self videoCodecArray] |
selecting:[_settingsModel currentVideoCodecSettingFromStore]]; |
@@ -60,8 +60,8 @@ typedef NS_ENUM(int, ARDSettingsSections) { |
#pragma mark - Data source |
-- (NSArray<NSString *> *)mediaConstraintsArray { |
- return _settingsModel.availableVideoResoultionsMediaConstraints; |
+- (NSArray<NSString *> *)videoResolutionArray { |
+ return _settingsModel.availableVideoResolutions; |
} |
- (NSArray<NSString *> *)videoCodecArray { |
@@ -102,8 +102,8 @@ typedef NS_ENUM(int, ARDSettingsSections) { |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
switch (section) { |
- case ARDSettingsSectionMediaConstraints: |
- return self.mediaConstraintsArray.count; |
+ case ARDSettingsSectionVideoResolution: |
+ return self.videoResolutionArray.count; |
case ARDSettingsSectionVideoCodec: |
return self.videoCodecArray.count; |
default: |
@@ -137,8 +137,8 @@ updateListSelectionAtIndexPath:(NSIndexPath *)indexPath |
- (nullable NSString *)tableView:(UITableView *)tableView |
titleForHeaderInSection:(NSInteger)section { |
switch (section) { |
- case ARDSettingsSectionMediaConstraints: |
- return @"Media constraints"; |
+ case ARDSettingsSectionVideoResolution: |
+ return @"Video resolution"; |
case ARDSettingsSectionVideoCodec: |
return @"Video codec"; |
case ARDSettingsSectionBitRate: |
@@ -151,7 +151,7 @@ updateListSelectionAtIndexPath:(NSIndexPath *)indexPath |
- (UITableViewCell *)tableView:(UITableView *)tableView |
cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
switch (indexPath.section) { |
- case ARDSettingsSectionMediaConstraints: |
+ case ARDSettingsSectionVideoResolution: |
return [self mediaConstraintsTableViewCellForTableView:tableView atIndexPath:indexPath]; |
case ARDSettingsSectionVideoCodec: |
@@ -168,8 +168,8 @@ updateListSelectionAtIndexPath:(NSIndexPath *)indexPath |
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
switch (indexPath.section) { |
- case ARDSettingsSectionMediaConstraints: |
- [self tableView:tableView didSelectMediaConstraintsCellAtIndexPath:indexPath]; |
+ case ARDSettingsSectionVideoResolution: |
+ [self tableView:tableView disSelectVideoResolutionAtIndex:indexPath]; |
break; |
case ARDSettingsSectionVideoCodec: |
@@ -188,18 +188,18 @@ updateListSelectionAtIndexPath:(NSIndexPath *)indexPath |
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault |
reuseIdentifier:dequeueIdentifier]; |
} |
- cell.textLabel.text = self.mediaConstraintsArray[indexPath.row]; |
+ cell.textLabel.text = self.videoResolutionArray[indexPath.row]; |
return cell; |
} |
- (void)tableView:(UITableView *)tableView |
- didSelectMediaConstraintsCellAtIndexPath:(NSIndexPath *)indexPath { |
+ disSelectVideoResolutionAtIndex:(NSIndexPath *)indexPath { |
[self tableView:tableView |
updateListSelectionAtIndexPath:indexPath |
- inSection:ARDSettingsSectionMediaConstraints]; |
+ inSection:ARDSettingsSectionVideoResolution]; |
- NSString *mediaConstraintsString = self.mediaConstraintsArray[indexPath.row]; |
- [_settingsModel storeVideoResoultionConstraint:mediaConstraintsString]; |
+ NSString *mediaConstraintsString = self.videoResolutionArray[indexPath.row]; |
daniela-webrtc
2017/04/03 10:16:50
Nit: rename mediaConstraintsString to videoResolut
sakal
2017/04/04 09:18:23
Done.
|
+ [_settingsModel storeVideoResolutionSetting:mediaConstraintsString]; |
} |
#pragma mark - Table view delegate(Video Codec) |