Index: webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
diff --git a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
index 1020621cc1bd2b91340963ac20609688aaacd8f6..ecf65286d8ad09a94f75ce1555bba2bedb348648 100644 |
--- a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
+++ b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m |
@@ -101,6 +101,7 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB. |
@implementation ARDAppClient { |
RTCFileLogger *_fileLogger; |
ARDTimerProxy *_statsTimer; |
+ RTCMediaConstraints *_defaultMediaStreamConstraints; |
} |
@synthesize shouldGetStats = _shouldGetStats; |
@@ -321,6 +322,10 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB. |
#endif |
} |
+- (void)setDefaultMediaStreamConstraints:(RTCMediaConstraints *)mediaConstraints { |
magjed_webrtc
2016/10/31 19:26:39
I don't think the word 'default' is appropriate he
daniela-webrtc
2016/11/01 09:51:12
That makes sense. Should we change the `defaultMed
magjed_webrtc
2016/11/01 12:06:09
I think we should leave the name 'defaultMediaAudi
|
+ _defaultMediaStreamConstraints = mediaConstraints; |
+} |
+ |
#pragma mark - ARDSignalingChannelDelegate |
- (void)channel:(id<ARDSignalingChannel>)channel |
@@ -737,18 +742,14 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB. |
NSString *valueLevelControl = _shouldUseLevelControl ? |
kRTCMediaConstraintsValueTrue : kRTCMediaConstraintsValueFalse; |
NSDictionary *mandatoryConstraints = @{ kRTCMediaConstraintsLevelControl : valueLevelControl }; |
- RTCMediaConstraints* constraints = |
- [[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatoryConstraints |
- optionalConstraints:nil]; |
+ RTCMediaConstraints *constraints = |
+ [[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatoryConstraints |
+ optionalConstraints:nil]; |
return constraints; |
} |
- (RTCMediaConstraints *)defaultMediaStreamConstraints { |
- RTCMediaConstraints* constraints = |
- [[RTCMediaConstraints alloc] |
- initWithMandatoryConstraints:nil |
- optionalConstraints:nil]; |
- return constraints; |
+ return _defaultMediaStreamConstraints; |
} |
- (RTCMediaConstraints *)defaultAnswerConstraints { |