Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m

Issue 1334003002: Loopback mode for AppRTCDemo on iOS. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Review Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
index 4318e6bfc1ac6cc5e6121dc948dda2f82ca10c20..cd0704a2c8ef2c7c06bf6102082ff6b91263dc0f 100644
--- a/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
@@ -22,6 +22,8 @@ static NSString * const kARDRoomServerHostUrl =
@"https://apprtc.appspot.com";
static NSString * const kARDRoomServerJoinFormat =
@"https://apprtc.appspot.com/join/%@";
+static NSString * const kARDRoomServerJoinFormatLoopback =
+ @"https://apprtc.appspot.com/join/%@?debug=loopback";
tkchin_webrtc 2015/09/11 17:53:53 I don't recall exactly, but do you actually need t
Chuck 2015/09/28 16:26:40 Yes, we need it. The server will add a special loo
static NSString * const kARDRoomServerMessageFormat =
@"https://apprtc.appspot.com/message/%@/%@";
static NSString * const kARDRoomServerLeaveFormat =
@@ -35,12 +37,20 @@ static NSInteger const kARDAppEngineClientErrorBadResponse = -1;
#pragma mark - ARDRoomServerClient
- (void)joinRoomWithRoomId:(NSString *)roomId
+ isLoopback:(BOOL)isLoopback
completionHandler:(void (^)(ARDJoinResponse *response,
NSError *error))completionHandler {
NSParameterAssert(roomId.length);
- NSString *urlString =
- [NSString stringWithFormat:kARDRoomServerJoinFormat, roomId];
+ NSString *urlString = nil;
+ if (isLoopback) {
+ urlString =
+ [NSString stringWithFormat:kARDRoomServerJoinFormatLoopback, roomId];
+ } else {
+ urlString =
+ [NSString stringWithFormat:kARDRoomServerJoinFormat, roomId];
+ }
+
NSURL *roomURL = [NSURL URLWithString:urlString];
RTCLog(@"Joining room:%@ on room server.", roomId);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:roomURL];

Powered by Google App Engine
This is Rietveld 408576698