Update ice server provider response format in iOS AppRTCMobile
BUG=webrtc:5963
Review-Url: https://codereview.webrtc.org/2627523004
Cr-Commit-Position: refs/heads/master@{#16050}
diff --git a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
index 40a2be7..ef21ab6 100644
--- a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
@@ -23,7 +23,7 @@
#import "WebRTC/RTCTracing.h"
#import "ARDAppEngineClient.h"
-#import "ARDCEODTURNClient.h"
+#import "ARDTURNClient+Internal.h"
#import "ARDJoinResponse.h"
#import "ARDMessageResponse.h"
#import "ARDSDPUtils.h"
@@ -33,12 +33,7 @@
#import "RTCIceCandidate+JSON.h"
#import "RTCSessionDescription+JSON.h"
-static NSString * const kARDDefaultSTUNServerUrl =
- @"stun:stun.l.google.com:19302";
-// TODO(tkchin): figure out a better username for CEOD statistics.
-static NSString * const kARDTurnRequestUrl =
- @"https://computeengineondemand.appspot.com"
- @"/turn?username=iapprtc&key=4080218913";
+static NSString * const kARDIceServerRequestUrl = @"https://appr.tc/params";
static NSString * const kARDAppClientErrorDomain = @"ARDAppClient";
static NSInteger const kARDAppClientErrorUnknown = -1;
@@ -133,21 +128,15 @@
@synthesize shouldUseLevelControl = _shouldUseLevelControl;
- (instancetype)init {
- if (self = [super init]) {
- _roomServerClient = [[ARDAppEngineClient alloc] init];
- NSURL *turnRequestURL = [NSURL URLWithString:kARDTurnRequestUrl];
- _turnClient = [[ARDCEODTURNClient alloc] initWithURL:turnRequestURL];
- [self configure];
- }
- return self;
+ return [self initWithDelegate:nil];
}
- (instancetype)initWithDelegate:(id<ARDAppClientDelegate>)delegate {
if (self = [super init]) {
_roomServerClient = [[ARDAppEngineClient alloc] init];
_delegate = delegate;
- NSURL *turnRequestURL = [NSURL URLWithString:kARDTurnRequestUrl];
- _turnClient = [[ARDCEODTURNClient alloc] initWithURL:turnRequestURL];
+ NSURL *turnRequestURL = [NSURL URLWithString:kARDIceServerRequestUrl];
+ _turnClient = [[ARDTURNClient alloc] initWithURL:turnRequestURL];
[self configure];
}
return self;
@@ -176,7 +165,7 @@
- (void)configure {
_factory = [[RTCPeerConnectionFactory alloc] init];
_messageQueue = [NSMutableArray array];
- _iceServers = [NSMutableArray arrayWithObject:[self defaultSTUNServer]];
+ _iceServers = [NSMutableArray array];
_fileLogger = [[RTCFileLogger alloc] init];
[_fileLogger start];
}
@@ -814,12 +803,6 @@
return constraints;
}
-- (RTCIceServer *)defaultSTUNServer {
- return [[RTCIceServer alloc] initWithURLStrings:@[kARDDefaultSTUNServerUrl]
- username:@""
- credential:@""];
-}
-
#pragma mark - Errors
+ (NSError *)errorForJoinResultType:(ARDJoinResultType)resultType {