To achieve this, several changes needed to be made on both UI and app logic level. * Settings view controller is added (modally shown when the settings button is pressed). - From there the user can see the current capture resolution and select another capture resolution. * Model class for the capture resolution added. - Improves readability and makes separation of concerns cleaner - Handles persisting - Provides defaults - Maps video resolution setting to RTCMediaConstraints dictionary * Test for the model class In future it would be possible to extend this CL and add further settings (i.e bit rate). Also it would be easy to remove the hardcoded resolutions and use dynamic values depending on device capability. BUG=webrtc:6473 Review-Url: https://codereview.webrtc.org/2462623002 Cr-Commit-Position: refs/heads/master@{#14881}
35 lines
1.0 KiB
Objective-C
35 lines
1.0 KiB
Objective-C
/*
|
|
* Copyright 2016 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* Light-weight persistent store for media constraints user settings.
|
|
*
|
|
* It will persist between application launches and application updates.
|
|
*/
|
|
@interface ARDMediaConstraintsSettingsStore : NSObject
|
|
|
|
/**
|
|
* Returns current video resolution media constraint string stored in the store.
|
|
*/
|
|
- (nullable NSString *)videoResolutionConstraintsSetting;
|
|
|
|
/**
|
|
* Stores the provided value as video resolution media constraint.
|
|
* @param value the string to be stored
|
|
*/
|
|
- (void)setVideoResolutionConstraintsSetting:(NSString *)value;
|
|
|
|
@end
|
|
NS_ASSUME_NONNULL_END
|