| Index: webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
|
| diff --git a/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
|
| index b03773e7db9e50f61cef68a1c679daefd785cab0..c90373569312d3a1e966a9a813882a4b28c7b38b 100644
|
| --- a/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
|
| +++ b/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
|
| @@ -10,8 +10,6 @@
|
|
|
| #import "RTCMediaConstraints+JSON.h"
|
|
|
| -#import "RTCPair.h"
|
| -
|
| static NSString const *kRTCMediaConstraintsMandatoryKey = @"mandatory";
|
|
|
| @implementation RTCMediaConstraints (JSON)
|
| @@ -19,12 +17,11 @@ static NSString const *kRTCMediaConstraintsMandatoryKey = @"mandatory";
|
| + (RTCMediaConstraints *)constraintsFromJSONDictionary:
|
| (NSDictionary *)dictionary {
|
| NSDictionary *mandatory = dictionary[kRTCMediaConstraintsMandatoryKey];
|
| - NSMutableArray *mandatoryContraints =
|
| - [NSMutableArray arrayWithCapacity:[mandatory count]];
|
| + NSMutableDictionary *mandatoryContraints =
|
| + [NSMutableDictionary dictionaryWithCapacity:[mandatory count]];
|
| [mandatory enumerateKeysAndObjectsUsingBlock:^(
|
| id key, id obj, BOOL *stop) {
|
| - [mandatoryContraints addObject:[[RTCPair alloc] initWithKey:key
|
| - value:obj]];
|
| + mandatoryContraints[key] = obj;
|
| }];
|
| // TODO(tkchin): figure out json formats for optional constraints.
|
| RTCMediaConstraints *constraints =
|
|
|