(Auto)update libjingle 62865357-> 62871616
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5674 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m b/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m
index 7108116..5b035e3 100644
--- a/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m
+++ b/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m
@@ -31,6 +31,8 @@
#import "GAEChannelClient.h"
#import "RTCICEServer.h"
+#import "APPRTCAppDelegate.h"
+#import "RTCMediaConstraints.h"
@interface APPRTCAppClient ()
@@ -62,6 +64,7 @@
@synthesize token = _token;
@synthesize verboseLogging = _verboseLogging;
@synthesize initiator = _initiator;
+@synthesize videoConstraints = _videoConstraints;
- (id)init {
if (self = [super init]) {
@@ -263,6 +266,9 @@
options:0
range:NSMakeRange(0, [self.roomHtml length])]) {
[self showMessage:@"Room full"];
+ APPRTCAppDelegate *ad =
+ (APPRTCAppDelegate *)[[UIApplication sharedApplication] delegate];
+ [ad closeVideoUI];
return;
}
@@ -331,6 +337,18 @@
}
[self updateICEServers:ICEServers withTurnServer:turnServerUrl];
+ NSString* mc = [self findVar:@"mediaConstraints" strippingQuotes:NO];
+ if (mc) {
+ error = nil;
+ NSData *mcData = [mc dataUsingEncoding:NSUTF8StringEncoding];
+ json =
+ [NSJSONSerialization JSONObjectWithData:mcData options:0 error:&error];
+ NSAssert(!error, @"Unable to parse. %@", error.localizedDescription);
+ if ([[json objectForKey:@"video"] boolValue]) {
+ self.videoConstraints = [[RTCMediaConstraints alloc] init];
+ }
+ }
+
[self maybeLogMessage:
[NSString stringWithFormat:@"About to open GAE with token: %@",
self.token]];