Loopback and audio only mode.
Adds a loopback button that will connect to itself by simulating another client connection to the web socket server.
Adds an audio only mode switch.
BUG=
Review URL: https://codereview.webrtc.org/1334003002
Cr-Commit-Position: refs/heads/master@{#10153}
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
index 4318e6b..cd0704a 100644
--- a/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
@@ -22,6 +22,8 @@
@"https://apprtc.appspot.com";
static NSString * const kARDRoomServerJoinFormat =
@"https://apprtc.appspot.com/join/%@";
+static NSString * const kARDRoomServerJoinFormatLoopback =
+ @"https://apprtc.appspot.com/join/%@?debug=loopback";
static NSString * const kARDRoomServerMessageFormat =
@"https://apprtc.appspot.com/message/%@/%@";
static NSString * const kARDRoomServerLeaveFormat =
@@ -35,12 +37,20 @@
#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];