diff options
author | henrike@webrtc.org <henrike@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-03-10 20:41:22 +0000 |
---|---|---|
committer | henrike@webrtc.org <henrike@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-03-10 20:41:22 +0000 |
commit | 6e2c318450409ed8a96e9acfee1bebb4aa72a5b2 (patch) | |
tree | bfb372b77d06ab2726e586c413f4d37574e05b6d /examples | |
parent | b1ad2cd39fca8ea62e7dc512e788a414b328db7d (diff) | |
download | talk-6e2c318450409ed8a96e9acfee1bebb4aa72a5b2.tar.gz |
(Auto)update libjingle 62865357-> 62871616
git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@5674 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ios/AppRTCDemo/APPRTCAppClient.h | 3 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/APPRTCAppClient.m | 18 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/APPRTCAppDelegate.h | 3 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/APPRTCAppDelegate.m | 105 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/APPRTCViewController.h | 6 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/APPRTCViewController.m | 90 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/VideoView.h | 50 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/VideoView.m | 168 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib | 313 |
9 files changed, 673 insertions, 83 deletions
diff --git a/examples/ios/AppRTCDemo/APPRTCAppClient.h b/examples/ios/AppRTCDemo/APPRTCAppClient.h index 608ed05..410ead6 100644 --- a/examples/ios/AppRTCDemo/APPRTCAppClient.h +++ b/examples/ios/AppRTCDemo/APPRTCAppClient.h @@ -36,6 +36,8 @@ @end +@class RTCMediaConstraints; + // Negotiates signaling for chatting with apprtc.appspot.com "rooms". // Uses the client<->server specifics of the apprtc AppEngine webapp. // @@ -48,6 +50,7 @@ @property(nonatomic, assign) id<ICEServerDelegate> ICEServerDelegate; @property(nonatomic, assign) id<GAEMessageHandler> messageHandler; @property(nonatomic, assign) BOOL initiator; +@property(nonatomic, strong) RTCMediaConstraints* videoConstraints; - (void)connectToRoom:(NSURL *)room; - (void)sendData:(NSData *)data; diff --git a/examples/ios/AppRTCDemo/APPRTCAppClient.m b/examples/ios/AppRTCDemo/APPRTCAppClient.m index 7108116..5b035e3 100644 --- a/examples/ios/AppRTCDemo/APPRTCAppClient.m +++ b/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]]; diff --git a/examples/ios/AppRTCDemo/APPRTCAppDelegate.h b/examples/ios/AppRTCDemo/APPRTCAppDelegate.h index 22754e3..22a0225 100644 --- a/examples/ios/AppRTCDemo/APPRTCAppDelegate.h +++ b/examples/ios/AppRTCDemo/APPRTCAppDelegate.h @@ -40,6 +40,7 @@ @end @class APPRTCViewController; +@class RTCVideoTrack; // The main application class of the AppRTCDemo iOS app demonstrating // interoperability between the Objcective C implementation of PeerConnection @@ -53,4 +54,6 @@ @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) APPRTCViewController *viewController; +- (void)closeVideoUI; + @end diff --git a/examples/ios/AppRTCDemo/APPRTCAppDelegate.m b/examples/ios/AppRTCDemo/APPRTCAppDelegate.m index 9b8c96d..681876e 100644 --- a/examples/ios/AppRTCDemo/APPRTCAppDelegate.m +++ b/examples/ios/AppRTCDemo/APPRTCAppDelegate.m @@ -25,6 +25,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#import <AVFoundation/AVFoundation.h> + #import "APPRTCAppDelegate.h" #import "APPRTCViewController.h" @@ -37,17 +39,25 @@ #import "RTCPeerConnectionDelegate.h" #import "RTCPeerConnectionFactory.h" #import "RTCSessionDescription.h" +#import "RTCVideoRenderer.h" +#import "RTCVideoCapturer.h" +#import "RTCVideoTrack.h" +#import "VideoView.h" @interface PCObserver : NSObject<RTCPeerConnectionDelegate> - (id)initWithDelegate:(id<APPRTCSendMessage>)delegate; +@property(nonatomic, strong) VideoView *videoView; + @end @implementation PCObserver { id<APPRTCSendMessage> _delegate; } +@synthesize videoView = _videoView; + - (id)initWithDelegate:(id<APPRTCSendMessage>)delegate { if (self = [super init]) { _delegate = delegate; @@ -71,16 +81,18 @@ dispatch_async(dispatch_get_main_queue(), ^(void) { NSAssert([stream.audioTracks count] >= 1, @"Expected at least 1 audio stream"); - //NSAssert([stream.videoTracks count] >= 1, - // @"Expected at least 1 video stream"); - // TODO(hughv): Add video support + NSAssert([stream.videoTracks count] <= 1, + @"Expected at most 1 video stream"); + if ([stream.videoTracks count] != 0) { + [[self videoView] + renderVideoTrackInterface:[stream.videoTracks objectAtIndex:0]]; + } }); } - (void)peerConnection:(RTCPeerConnection *)peerConnection removedStream:(RTCMediaStream *)stream { NSLog(@"PCO onRemoveStream."); - // TODO(hughv): Remove video track. } - (void) @@ -166,8 +178,7 @@ - (void)applicationWillResignActive:(UIApplication *)application { [self displayLogMessage:@"Application lost focus, connection broken."]; - [self disconnect]; - [self.viewController resetUI]; + [self closeVideoUI]; } - (void)applicationDidEnterBackground:(UIApplication *)application { @@ -212,7 +223,21 @@ - (void)onICEServers:(NSArray *)servers { self.queuedRemoteCandidates = [NSMutableArray array]; self.peerConnectionFactory = [[RTCPeerConnectionFactory alloc] init]; - RTCMediaConstraints *constraints = [[RTCMediaConstraints alloc] init]; + RTCMediaConstraints *constraints = [[RTCMediaConstraints alloc] + initWithMandatoryConstraints: + @[[[RTCPair alloc] + initWithKey:@"OfferToReceiveAudio" + value:@"true"], + [[RTCPair alloc] + initWithKey:@"OfferToReceiveVideo" + value:@"true"]] + optionalConstraints: + @[[[RTCPair alloc] + initWithKey:@"internalSctpDataChannels" + value:@"true"], + [[RTCPair alloc] + initWithKey:@"DtlsSrtpKeyAgreement" + value:@"true"]]]; self.pcObserver = [[PCObserver alloc] initWithDelegate:self]; self.peerConnection = [self.peerConnectionFactory peerConnectionWithICEServers:servers @@ -220,7 +245,34 @@ delegate:self.pcObserver]; RTCMediaStream *lms = [self.peerConnectionFactory mediaStreamWithLabel:@"ARDAMS"]; - // TODO(hughv): Add video. + + NSString *cameraID = nil; + for (AVCaptureDevice *captureDevice in + [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo] ) { + if (captureDevice.position == AVCaptureDevicePositionFront) { + cameraID = [captureDevice localizedName]; + break; + } + } + NSAssert(cameraID, @"Unable to get the front camera id"); + + RTCVideoCapturer *capturer = + [RTCVideoCapturer capturerWithDeviceName:cameraID]; + RTCVideoSource *videoSource = + [self.peerConnectionFactory + videoSourceWithCapturer:capturer constraints:self.client.videoConstraints]; + RTCVideoTrack *localVideoTrack = + [self.peerConnectionFactory + videoTrackWithID:@"ARDAMSv0" source:videoSource]; + if (localVideoTrack) { + [lms addVideoTrack:localVideoTrack]; + } + + [self.viewController.localVideoView + renderVideoTrackInterface:localVideoTrack]; + + self.pcObserver.videoView = self.viewController.remoteVideoView; + [lms addAudioTrack:[self.peerConnectionFactory audioTrackWithID:@"ARDAMSa0"]]; [self.peerConnection addStream:lms constraints:constraints]; [self displayLogMessage:@"onICEServers - add local stream."]; @@ -236,10 +288,9 @@ [self displayLogMessage:@"GAE onOpen - create offer."]; RTCPair *audio = [[RTCPair alloc] initWithKey:@"OfferToReceiveAudio" value:@"true"]; - // TODO(hughv): Add video. - // RTCPair *video = [[RTCPair alloc] initWithKey:@"OfferToReceiveVideo" - // value:@"true"]; - NSArray *mandatory = @[ audio /*, video*/ ]; + RTCPair *video = [[RTCPair alloc] initWithKey:@"OfferToReceiveVideo" + value:@"true"]; + NSArray *mandatory = @[ audio , video ]; RTCMediaConstraints *constraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatory optionalConstraints:nil]; @@ -283,7 +334,14 @@ sessionDescription:sdp]; [self displayLogMessage:@"PC - setRemoteDescription."]; } else if ([value compare:@"bye"] == NSOrderedSame) { - [self disconnect]; + [self closeVideoUI]; + UIAlertView *alertView = + [[UIAlertView alloc] initWithTitle:@"Remote end hung up" + message:@"dropping PeerConnection" + delegate:nil + cancelButtonTitle:@"OK" + otherButtonTitles:nil]; + [alertView show]; } else { NSAssert(NO, @"Invalid message: %@", data); } @@ -291,13 +349,13 @@ - (void)onClose { [self displayLogMessage:@"GAE onClose."]; - [self disconnect]; + [self closeVideoUI]; } - (void)onError:(int)code withDescription:(NSString *)description { [self displayLogMessage: [NSString stringWithFormat:@"GAE onError: %@", description]]; - [self disconnect]; + [self closeVideoUI]; } #pragma mark - RTCSessionDescriptonDelegate methods @@ -411,11 +469,10 @@ RTCPair *audio = [[RTCPair alloc] initWithKey:@"OfferToReceiveAudio" value:@"true"]; - // TODO(hughv): Add video. - // RTCPair *video = - // [[RTCPair alloc] - // initWithKey:@"OfferToReceiveVideo" value:@"true"]; - NSArray *mandatory = @[ audio /*, video*/ ]; + RTCPair *video = + [[RTCPair alloc] + initWithKey:@"OfferToReceiveVideo" value:@"true"]; + NSArray *mandatory = @[ audio , video ]; RTCMediaConstraints *constraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatory @@ -441,6 +498,7 @@ - (void)disconnect { [self.client sendData:[@"{\"type\": \"bye\"}" dataUsingEncoding:NSUTF8StringEncoding]]; + [self.peerConnection close]; self.peerConnection = nil; self.peerConnectionFactory = nil; self.pcObserver = nil; @@ -479,4 +537,11 @@ return removeBackslash; } +#pragma mark - public methods + +- (void)closeVideoUI { + [self disconnect]; + [self.viewController resetUI]; +} + @end diff --git a/examples/ios/AppRTCDemo/APPRTCViewController.h b/examples/ios/AppRTCDemo/APPRTCViewController.h index 6b107a5..2db01a6 100644 --- a/examples/ios/AppRTCDemo/APPRTCViewController.h +++ b/examples/ios/AppRTCDemo/APPRTCViewController.h @@ -27,12 +27,18 @@ #import <UIKit/UIKit.h> +@class VideoView; + // The view controller that is displayed when AppRTCDemo is loaded. @interface APPRTCViewController : UIViewController<UITextFieldDelegate> @property (weak, nonatomic) IBOutlet UITextField *textField; @property (weak, nonatomic) IBOutlet UITextView *textInstructions; @property (weak, nonatomic) IBOutlet UITextView *textOutput; +@property(weak, nonatomic) IBOutlet UIView* blackView; + +@property(nonatomic, strong) VideoView* remoteVideoView; +@property(nonatomic, strong) VideoView* localVideoView; - (void)displayText:(NSString *)text; - (void)resetUI; diff --git a/examples/ios/AppRTCDemo/APPRTCViewController.m b/examples/ios/AppRTCDemo/APPRTCViewController.m index bd346ef..cacac14 100644 --- a/examples/ios/AppRTCDemo/APPRTCViewController.m +++ b/examples/ios/AppRTCDemo/APPRTCViewController.m @@ -27,8 +27,12 @@ #import "APPRTCViewController.h" +#import "VideoView.h" + @interface APPRTCViewController () +@property (nonatomic, assign) UIInterfaceOrientation statusBarOrientation; + @end @implementation APPRTCViewController @@ -36,13 +40,31 @@ @synthesize textField = _textField; @synthesize textInstructions = _textInstructions; @synthesize textOutput = _textOutput; +@synthesize blackView = _blackView; + +@synthesize remoteVideoView = _remoteVideoView; +@synthesize localVideoView = _localVideoView; + +@synthesize statusBarOrientation = _statusBarOrientation; - (void)viewDidLoad { [super viewDidLoad]; + self.statusBarOrientation = + [UIApplication sharedApplication].statusBarOrientation; self.textField.delegate = self; [self.textField becomeFirstResponder]; } +- (void)viewDidLayoutSubviews { + if (self.statusBarOrientation != + [UIApplication sharedApplication].statusBarOrientation) { + self.statusBarOrientation = + [UIApplication sharedApplication].statusBarOrientation; + [[NSNotificationCenter defaultCenter] + postNotificationName:@"StatusBarOrientationDidChange" object:nil]; + } +} + - (void)displayText:(NSString *)text { dispatch_async(dispatch_get_main_queue(), ^(void) { NSString *output = @@ -52,11 +74,75 @@ } - (void)resetUI { + [self.textField resignFirstResponder]; self.textField.text = nil; self.textField.hidden = NO; self.textInstructions.hidden = NO; self.textOutput.hidden = YES; self.textOutput.text = nil; + self.blackView.hidden = YES; + + [_remoteVideoView stop]; + [_remoteVideoView removeFromSuperview]; + self.remoteVideoView = nil; + + [_localVideoView stop]; + [_localVideoView removeFromSuperview]; + self.localVideoView = nil; +} + +// TODO(fischman): Use video dimensions from the incoming video stream +// and resize the Video View accordingly w.r.t. aspect ratio. +enum { + // Remote video view dimensions. + kRemoteVideoWidth = 640, + kRemoteVideoHeight = 480, + // Padding space for local video view with its parent. + kLocalViewPadding = 20 +}; + +- (void)setupCaptureSession { + self.blackView.hidden = NO; + + CGRect frame = CGRectMake((self.blackView.bounds.size.width + -kRemoteVideoWidth)/2, + (self.blackView.bounds.size.height + -kRemoteVideoHeight)/2, + kRemoteVideoWidth, + kRemoteVideoHeight); + VideoView *videoView = [[VideoView alloc] initWithFrame:frame]; + videoView.isRemote = TRUE; + + [self.blackView addSubview:videoView]; + videoView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | + UIViewAutoresizingFlexibleRightMargin | + UIViewAutoresizingFlexibleBottomMargin | + UIViewAutoresizingFlexibleTopMargin; + videoView.translatesAutoresizingMaskIntoConstraints = YES; + _remoteVideoView = videoView; + + CGSize screenSize = [[UIScreen mainScreen] bounds].size; + CGFloat localVideoViewWidth = + UIInterfaceOrientationIsPortrait(self.statusBarOrientation) ? + screenSize.width/4 : screenSize.height/4; + CGFloat localVideoViewHeight = + UIInterfaceOrientationIsPortrait(self.statusBarOrientation) ? + screenSize.height/4 : screenSize.width/4; + frame = CGRectMake(self.blackView.bounds.size.width + -localVideoViewWidth-kLocalViewPadding, + kLocalViewPadding, + localVideoViewWidth, + localVideoViewHeight); + videoView = [[VideoView alloc] initWithFrame:frame]; + videoView.isRemote = FALSE; + + [self.blackView addSubview:videoView]; + videoView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | + UIViewAutoresizingFlexibleBottomMargin | + UIViewAutoresizingFlexibleHeight | + UIViewAutoresizingFlexibleWidth; + videoView.translatesAutoresizingMaskIntoConstraints = YES; + _localVideoView = videoView; } #pragma mark - UITextFieldDelegate @@ -76,6 +162,10 @@ NSString *url = [NSString stringWithFormat:@"apprtc://apprtc.appspot.com/?r=%@", room]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self setupCaptureSession]; + }); } - (BOOL)textFieldShouldReturn:(UITextField *)textField { diff --git a/examples/ios/AppRTCDemo/VideoView.h b/examples/ios/AppRTCDemo/VideoView.h new file mode 100644 index 0000000..ff3167c --- /dev/null +++ b/examples/ios/AppRTCDemo/VideoView.h @@ -0,0 +1,50 @@ +/* + * libjingle + * Copyright 2013, Google Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <UIKit/UIKit.h> + +@class RTCVideoTrack; + +// This class encapsulates VideoRenderIosView. +@interface VideoView : UIView + +// Property to get/set required video orientation. +@property(nonatomic, assign) UIInterfaceOrientation videoOrientation; +// Specifies whether the object represents a local or remote video stream. +@property(nonatomic, assign) BOOL isRemote; + +// Sets up the underlying renderer and track objects. +- (void)renderVideoTrackInterface:(RTCVideoTrack*)track; + +// Stops rendering. +- (void)pause; +// Starts rendering. +- (void)resume; +// Stops rendering and resets underlying renderer and track objects. +- (void)stop; + +@end diff --git a/examples/ios/AppRTCDemo/VideoView.m b/examples/ios/AppRTCDemo/VideoView.m new file mode 100644 index 0000000..d563fb3 --- /dev/null +++ b/examples/ios/AppRTCDemo/VideoView.m @@ -0,0 +1,168 @@ +/* + * libjingle + * Copyright 2013, Google Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This VideoView must be initialzed and added to a View to get + * either the local or remote video stream rendered. + * It is a view itself and it encapsulates + * an object of VideoRenderIosView and UIActivityIndicatorView. + * Both of the views will get resized as per the frame of their parent. + */ + +#import "VideoView.h" + +#import "RTCVideoRenderer.h" +#import "RTCVideoTrack.h" + +@interface VideoView () { + RTCVideoTrack *_track; + RTCVideoRenderer *_renderer; +} + +@property (nonatomic, weak) UIView *renderView; +@property (nonatomic, weak) UIActivityIndicatorView *activityView; + +@end + +@implementation VideoView + +@synthesize videoOrientation = _videoOrientation; +@synthesize isRemote = _isRemote; +@synthesize renderView = _renderView; +@synthesize activityView = _activityView; + +static void init(VideoView *self) { + UIView *renderView = [RTCVideoRenderer newRenderViewWithFrame: + CGRectMake(0, + 0, + self.bounds.size.width, + self.bounds.size.height)]; + [self addSubview:renderView]; + renderView.autoresizingMask = UIViewAutoresizingFlexibleHeight | + UIViewAutoresizingFlexibleWidth; + renderView.translatesAutoresizingMaskIntoConstraints = YES; + self.renderView = renderView; + + UIActivityIndicatorView *indicatorView = + [[UIActivityIndicatorView alloc] + initWithActivityIndicatorStyle: + UIActivityIndicatorViewStyleWhiteLarge]; + indicatorView.frame = self.bounds; + indicatorView.hidesWhenStopped = YES; + [self addSubview:indicatorView]; + indicatorView.autoresizingMask = UIViewAutoresizingFlexibleWidth | + UIViewAutoresizingFlexibleHeight; + indicatorView.translatesAutoresizingMaskIntoConstraints = YES; + [indicatorView startAnimating]; + self.activityView = indicatorView; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + init(self); + } + return self; +} + +-(id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + init(self); + } + return self; +} + +- (UIInterfaceOrientation)videoOrientation { + return _videoOrientation; +} + +- (void)setVideoOrientation:(UIInterfaceOrientation)videoOrientation { + if (_videoOrientation != videoOrientation) { + _videoOrientation = videoOrientation; + + CGFloat angle; + switch (videoOrientation) { + case UIInterfaceOrientationPortrait: + angle = M_PI_2; + break; + case UIInterfaceOrientationPortraitUpsideDown: + angle = -M_PI_2; + break; + case UIInterfaceOrientationLandscapeLeft: + angle = M_PI; + break; + case UIInterfaceOrientationLandscapeRight: + angle = 0; + break; + } + // The video comes in mirrored. That is fine for the local video, + // but the remote video should be put back to original. + CGAffineTransform xform = + CGAffineTransformMakeScale([self isRemote] ? -1 : 1, 1); + xform = CGAffineTransformRotate(xform, angle); + [[self renderView] setTransform:xform]; + } +} + +- (void)renderVideoTrackInterface:(RTCVideoTrack *)videoTrack { + [self stop]; + + _track = videoTrack; + + if (_track) { + if (!_renderer) { + _renderer = [[RTCVideoRenderer alloc] + initWithRenderView:[self renderView]]; + } + [_track addRenderer:_renderer]; + [self resume]; + } + + [self setVideoOrientation:UIInterfaceOrientationLandscapeLeft]; + [self setVideoOrientation:UIInterfaceOrientationPortrait]; + [self setVideoOrientation:UIInterfaceOrientationLandscapeLeft]; +} + +-(void)pause { + [_renderer stop]; +} + +-(void)resume { + [self.activityView stopAnimating]; + [self.activityView removeFromSuperview]; + self.activityView = nil; + + [_renderer start]; +} + +- (void)stop { + [_track removeRenderer:_renderer]; + [_renderer stop]; +} + +@end diff --git a/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib b/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib index cd73ea6..92d2ade 100644 --- a/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib +++ b/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00"> <data> - <int key="IBDocument.SystemTarget">1552</int> - <string key="IBDocument.SystemVersion">12D78</string> - <string key="IBDocument.InterfaceBuilderVersion">3084</string> - <string key="IBDocument.AppKitVersion">1187.37</string> - <string key="IBDocument.HIToolboxVersion">626.00</string> + <int key="IBDocument.SystemTarget">1536</int> + <string key="IBDocument.SystemVersion">13B42</string> + <string key="IBDocument.InterfaceBuilderVersion">4514</string> + <string key="IBDocument.AppKitVersion">1265</string> + <string key="IBDocument.HIToolboxVersion">696.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string key="NS.object.0">2083</string> + <string key="NS.object.0">3747</string> </object> <array key="IBDocument.IntegratedClassDependencies"> <string>IBNSLayoutConstraint</string> @@ -34,7 +34,7 @@ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> </object> <object class="IBUIView" id="774585933"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder"/> <int key="NSvFlags">274</int> <array class="NSMutableArray" key="NSSubviews"> <object class="IBUITextView" id="176994284"> @@ -42,7 +42,8 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{20, 20}, {280, 141}}</string> <reference key="NSSuperview" ref="774585933"/> - <reference key="NSNextKeyView" ref="546385578"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="634862110"/> <string key="NSReuseIdentifierKey">_NS:9</string> <object class="NSColor" key="IBUIBackgroundColor" id="621995359"> <int key="NSColorSpace">1</int> @@ -60,8 +61,8 @@ <int key="type">1</int> <double key="pointSize">14</double> </object> - <object class="NSFont" key="IBUIFont" id="371333696"> - <string key="NSName">Helvetica</string> + <object class="NSFont" key="IBUIFont" id="144501234"> + <string key="NSName">HelveticaNeue</string> <double key="NSSize">14</double> <int key="NSfFlags">16</int> </object> @@ -71,7 +72,8 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{20, 180}, {280, 30}}</string> <reference key="NSSuperview" ref="774585933"/> - <reference key="NSNextKeyView" ref="634862110"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="261050959"/> <string key="NSReuseIdentifierKey">_NS:9</string> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClipsSubviews">YES</bool> @@ -95,13 +97,15 @@ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> </object> <reference key="IBUIFontDescription" ref="166497611"/> - <reference key="IBUIFont" ref="371333696"/> + <reference key="IBUIFont" ref="144501234"/> </object> <object class="IBUITextView" id="634862110"> <reference key="NSNextResponder" ref="774585933"/> <int key="NSvFlags">-2147483356</int> - <string key="NSFrame">{{20, 20}, {280, 508}}</string> + <string key="NSFrame">{{20, 20}, {280, 190}}</string> <reference key="NSSuperview" ref="774585933"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="546385578"/> <string key="NSReuseIdentifierKey">_NS:9</string> <reference key="IBUIBackgroundColor" ref="621995359"/> <bool key="IBUIClipsSubviews">YES</bool> @@ -114,10 +118,26 @@ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> </object> <reference key="IBUIFontDescription" ref="166497611"/> - <reference key="IBUIFont" ref="371333696"/> + <reference key="IBUIFont" ref="144501234"/> + </object> + <object class="IBUIView" id="261050959"> + <reference key="NSNextResponder" ref="774585933"/> + <int key="NSvFlags">-2147483356</int> + <string key="NSFrame">{{20, 228}, {280, 300}}</string> + <reference key="NSSuperview" ref="774585933"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <object class="NSColor" key="IBUIBackgroundColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> </object> </array> <string key="NSFrame">{{0, 20}, {320, 548}}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="176994284"/> <object class="NSColor" key="IBUIBackgroundColor"> <int key="NSColorSpace">3</int> @@ -140,7 +160,7 @@ </array> </object> <string key="IBUITargetRuntime">IBCocoaTouchFramework</string> - <string key="IBUIDisplayName">Retina 4 Full Screen</string> + <string key="IBUIDisplayName">Retina 4-inch Full Screen</string> <int key="IBUIType">2</int> </object> <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> @@ -180,6 +200,14 @@ </object> <int key="connectionID">138</int> </object> + <object class="IBConnectionRecord"> + <object class="IBCocoaTouchOutletConnection" key="connection"> + <string key="label">blackView</string> + <reference key="source" ref="372490531"/> + <reference key="destination" ref="261050959"/> + </object> + <int key="connectionID">151</int> + </object> </array> <object class="IBMutableOrderedSet" key="objectRecords"> <array key="orderedObjects"> @@ -204,12 +232,12 @@ <int key="objectID">6</int> <reference key="object" ref="774585933"/> <array class="NSMutableArray" key="children"> - <object class="IBNSLayoutConstraint" id="117610664"> + <object class="IBNSLayoutConstraint" id="933872207"> <reference key="firstItem" ref="774585933"/> - <int key="firstAttribute">6</int> + <int key="firstAttribute">4</int> <int key="relation">0</int> - <reference key="secondItem" ref="546385578"/> - <int key="secondAttribute">6</int> + <reference key="secondItem" ref="261050959"/> + <int key="secondAttribute">4</int> <float key="multiplier">1</float> <object class="IBNSLayoutSymbolicConstant" key="constant"> <double key="value">20</double> @@ -217,88 +245,145 @@ <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> <int key="scoringType">8</int> - <float key="scoringTypeFloat">29</float> + <float key="scoringTypeFloat">23</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> - <object class="IBNSLayoutConstraint" id="555801739"> - <reference key="firstItem" ref="546385578"/> + <object class="IBNSLayoutConstraint" id="863471211"> + <reference key="firstItem" ref="261050959"/> <int key="firstAttribute">3</int> <int key="relation">0</int> <reference key="secondItem" ref="774585933"/> <int key="secondAttribute">3</int> <float key="multiplier">1</float> <object class="IBLayoutConstant" key="constant"> - <double key="value">180</double> + <double key="value">228</double> </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> <int key="scoringType">3</int> <float key="scoringTypeFloat">9</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> - <object class="IBNSLayoutConstraint" id="860801955"> + <object class="IBNSLayoutConstraint" id="590654550"> <reference key="firstItem" ref="546385578"/> <int key="firstAttribute">5</int> <int key="relation">0</int> - <reference key="secondItem" ref="774585933"/> + <reference key="secondItem" ref="261050959"/> <int key="secondAttribute">5</int> <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">0.0</double> + </object> + <float key="priority">1000</float> + <reference key="containingView" ref="774585933"/> + <int key="scoringType">6</int> + <float key="scoringTypeFloat">24</float> + <int key="contentType">2</int> + <bool key="placeholder">NO</bool> + </object> + <object class="IBNSLayoutConstraint" id="734153049"> + <reference key="firstItem" ref="546385578"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="261050959"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">0.0</double> + </object> + <float key="priority">1000</float> + <reference key="containingView" ref="774585933"/> + <int key="scoringType">6</int> + <float key="scoringTypeFloat">24</float> + <int key="contentType">2</int> + <bool key="placeholder">NO</bool> + </object> + <object class="IBNSLayoutConstraint" id="117610664"> + <reference key="firstItem" ref="774585933"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="546385578"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> <object class="IBNSLayoutSymbolicConstant" key="constant"> <double key="value">20</double> </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> - <object class="IBNSLayoutConstraint" id="19985792"> - <reference key="firstItem" ref="634862110"/> - <int key="firstAttribute">3</int> + <object class="IBNSLayoutConstraint" id="860801955"> + <reference key="firstItem" ref="546385578"/> + <int key="firstAttribute">5</int> <int key="relation">0</int> <reference key="secondItem" ref="774585933"/> - <int key="secondAttribute">3</int> + <int key="secondAttribute">5</int> <float key="multiplier">1</float> <object class="IBNSLayoutSymbolicConstant" key="constant"> <double key="value">20</double> </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> - <object class="IBNSLayoutConstraint" id="1001701893"> - <reference key="firstItem" ref="774585933"/> - <int key="firstAttribute">6</int> + <object class="IBNSLayoutConstraint" id="544488581"> + <reference key="firstItem" ref="634862110"/> + <int key="firstAttribute">4</int> <int key="relation">0</int> - <reference key="secondItem" ref="634862110"/> - <int key="secondAttribute">6</int> + <reference key="secondItem" ref="546385578"/> + <int key="secondAttribute">4</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">0.0</double> + </object> + <float key="priority">1000</float> + <reference key="containingView" ref="774585933"/> + <int key="scoringType">6</int> + <float key="scoringTypeFloat">24</float> + <int key="contentType">2</int> + <bool key="placeholder">NO</bool> + </object> + <object class="IBNSLayoutConstraint" id="19985792"> + <reference key="firstItem" ref="634862110"/> + <int key="firstAttribute">3</int> + <int key="relation">0</int> + <reference key="secondItem" ref="774585933"/> + <int key="secondAttribute">3</int> <float key="multiplier">1</float> <object class="IBNSLayoutSymbolicConstant" key="constant"> <double key="value">20</double> </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> - <object class="IBNSLayoutConstraint" id="914503793"> + <object class="IBNSLayoutConstraint" id="1001701893"> <reference key="firstItem" ref="774585933"/> - <int key="firstAttribute">4</int> + <int key="firstAttribute">6</int> <int key="relation">0</int> <reference key="secondItem" ref="634862110"/> - <int key="secondAttribute">4</int> + <int key="secondAttribute">6</int> <float key="multiplier">1</float> <object class="IBNSLayoutSymbolicConstant" key="constant"> <double key="value">20</double> </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> <object class="IBNSLayoutConstraint" id="858545289"> <reference key="firstItem" ref="634862110"/> @@ -312,9 +397,10 @@ </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> <object class="IBNSLayoutConstraint" id="1039342825"> <reference key="firstItem" ref="774585933"/> @@ -328,9 +414,10 @@ </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> <object class="IBNSLayoutConstraint" id="663764352"> <reference key="firstItem" ref="176994284"/> @@ -344,9 +431,10 @@ </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> <object class="IBNSLayoutConstraint" id="46028745"> <reference key="firstItem" ref="176994284"/> @@ -360,13 +448,15 @@ </object> <float key="priority">1000</float> <reference key="containingView" ref="774585933"/> - <int key="scoringType">8</int> + <int key="scoringType">0</int> <float key="scoringTypeFloat">29</float> <int key="contentType">3</int> + <bool key="placeholder">NO</bool> </object> <reference ref="176994284"/> <reference ref="546385578"/> <reference ref="634862110"/> + <reference ref="261050959"/> </array> <reference key="parent" ref="0"/> </object> @@ -389,6 +479,7 @@ <int key="scoringType">3</int> <float key="scoringTypeFloat">9</float> <int key="contentType">1</int> + <bool key="placeholder">NO</bool> </object> </array> <reference key="parent" ref="774585933"/> @@ -425,11 +516,6 @@ <reference key="parent" ref="176994284"/> </object> <object class="IBObjectRecord"> - <int key="objectID">124</int> - <reference key="object" ref="555801739"/> - <reference key="parent" ref="774585933"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">126</int> <reference key="object" ref="117610664"/> <reference key="parent" ref="774585933"/> @@ -437,7 +523,25 @@ <object class="IBObjectRecord"> <int key="objectID">128</int> <reference key="object" ref="634862110"/> - <array class="NSMutableArray" key="children"/> + <array class="NSMutableArray" key="children"> + <object class="IBNSLayoutConstraint" id="988159807"> + <reference key="firstItem" ref="634862110"/> + <int key="firstAttribute">8</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">190</double> + </object> + <float key="priority">1000</float> + <reference key="containingView" ref="634862110"/> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <bool key="placeholder">NO</bool> + </object> + </array> <reference key="parent" ref="774585933"/> </object> <object class="IBObjectRecord"> @@ -446,11 +550,6 @@ <reference key="parent" ref="774585933"/> </object> <object class="IBObjectRecord"> - <int key="objectID">136</int> - <reference key="object" ref="914503793"/> - <reference key="parent" ref="774585933"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">137</int> <reference key="object" ref="1001701893"/> <reference key="parent" ref="774585933"/> @@ -460,6 +559,41 @@ <reference key="object" ref="19985792"/> <reference key="parent" ref="774585933"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">141</int> + <reference key="object" ref="988159807"/> + <reference key="parent" ref="634862110"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">142</int> + <reference key="object" ref="261050959"/> + <reference key="parent" ref="774585933"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">148</int> + <reference key="object" ref="734153049"/> + <reference key="parent" ref="774585933"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">149</int> + <reference key="object" ref="590654550"/> + <reference key="parent" ref="774585933"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">153</int> + <reference key="object" ref="863471211"/> + <reference key="parent" ref="774585933"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">154</int> + <reference key="object" ref="933872207"/> + <reference key="parent" ref="774585933"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">155</int> + <reference key="object" ref="544488581"/> + <reference key="parent" ref="774585933"/> + </object> </array> </object> <dictionary class="NSMutableDictionary" key="flattenedProperties"> @@ -471,31 +605,43 @@ <boolean value="NO" key="104.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> <string key="107.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="123.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string key="124.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="126.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="128.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <array key="128.IBViewMetadataConstraints"> + <reference ref="988159807"/> + </array> <boolean value="NO" key="128.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> <string key="133.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="137.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="139.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="141.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="142.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <boolean value="NO" key="142.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="148.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="153.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="154.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="155.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <array class="NSMutableArray" key="57.IBViewMetadataConstraints"> <reference ref="234302232"/> </array> <boolean value="NO" key="57.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <array key="6.IBViewMetadataConstraints"> + <array class="NSMutableArray" key="6.IBViewMetadataConstraints"> <reference ref="46028745"/> <reference ref="663764352"/> <reference ref="1039342825"/> <reference ref="858545289"/> - <reference ref="914503793"/> <reference ref="1001701893"/> <reference ref="19985792"/> + <reference ref="544488581"/> <reference ref="860801955"/> - <reference ref="555801739"/> <reference ref="117610664"/> + <reference ref="734153049"/> + <reference ref="590654550"/> + <reference ref="863471211"/> + <reference ref="933872207"/> </array> <string key="62.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="63.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> @@ -505,11 +651,43 @@ <nil key="activeLocalization"/> <dictionary class="NSMutableDictionary" key="localizations"/> <nil key="sourceID"/> - <int key="maxID">139</int> + <int key="maxID">155</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <array class="NSMutableArray" key="referencedPartialClassDescriptions"> <object class="IBPartialClassDescription"> + <string key="className">APPRTCViewController</string> + <string key="superclassName">UIViewController</string> + <dictionary class="NSMutableDictionary" key="outlets"> + <string key="blackView">UIView</string> + <string key="textField">UITextField</string> + <string key="textInstructions">UITextView</string> + <string key="textOutput">UITextView</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> + <object class="IBToOneOutletInfo" key="blackView"> + <string key="name">blackView</string> + <string key="candidateClassName">UIView</string> + </object> + <object class="IBToOneOutletInfo" key="textField"> + <string key="name">textField</string> + <string key="candidateClassName">UITextField</string> + </object> + <object class="IBToOneOutletInfo" key="textInstructions"> + <string key="name">textInstructions</string> + <string key="candidateClassName">UITextView</string> + </object> + <object class="IBToOneOutletInfo" key="textOutput"> + <string key="name">textOutput</string> + <string key="candidateClassName">UITextView</string> + </object> + </dictionary> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/APPRTCViewController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSLayoutConstraint</string> <string key="superclassName">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -521,9 +699,18 @@ </object> <int key="IBDocument.localizationMode">0</int> <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> + <bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">YES</bool> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> + <real value="1536" key="NS.object.0"/> + </object> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> + <integer value="4600" key="NS.object.0"/> + </object> <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> <int key="IBDocument.defaultPropertyAccessControl">3</int> <bool key="IBDocument.UseAutolayout">YES</bool> - <string key="IBCocoaTouchPluginVersion">2083</string> + <string key="IBCocoaTouchPluginVersion">3747</string> </data> </archive> |