Index: webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m |
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m |
index 3ba85563d472e192c0003a1f4a65aa10bd047a22..ca0656dc988629f6b61cc144c6f01bac594aad36 100644 |
--- a/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m |
+++ b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m |
@@ -8,7 +8,7 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#import "RTCICEServer+JSON.h" |
+#import "RTCIceServer+JSON.h" |
static NSString const *kRTCICEServerUsernameKey = @"username"; |
static NSString const *kRTCICEServerPasswordKey = @"password"; |
@@ -16,17 +16,17 @@ static NSString const *kRTCICEServerUrisKey = @"uris"; |
static NSString const *kRTCICEServerUrlKey = @"urls"; |
static NSString const *kRTCICEServerCredentialKey = @"credential"; |
-@implementation RTCICEServer (JSON) |
+@implementation RTCIceServer (JSON) |
-+ (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary { |
++ (RTCIceServer *)serverFromJSONDictionary:(NSDictionary *)dictionary { |
NSString *url = dictionary[kRTCICEServerUrlKey]; |
NSString *username = dictionary[kRTCICEServerUsernameKey]; |
NSString *credential = dictionary[kRTCICEServerCredentialKey]; |
username = username ? username : @""; |
credential = credential ? credential : @""; |
- return [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:url] |
- username:username |
- password:credential]; |
+ return [[RTCIceServer alloc] initWithURLStrings:@[url] |
+ username:username |
+ credential:credential]; |
} |
+ (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary { |
@@ -35,10 +35,10 @@ static NSString const *kRTCICEServerCredentialKey = @"credential"; |
NSArray *uris = dictionary[kRTCICEServerUrisKey]; |
hjon_webrtc
2016/02/12 17:34:56
Should one IceServer be created with all of these
|
NSMutableArray *servers = [NSMutableArray arrayWithCapacity:uris.count]; |
for (NSString *uri in uris) { |
- RTCICEServer *server = |
- [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:uri] |
- username:username |
- password:password]; |
+ RTCIceServer *server = |
+ [[RTCIceServer alloc] initWithURLStrings:@[uri] |
+ username:username |
+ credential:password]; |
[servers addObject:server]; |
} |
return servers; |