diff options
author | fischman@webrtc.org <fischman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-03-31 20:22:19 +0000 |
---|---|---|
committer | fischman@webrtc.org <fischman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-03-31 20:22:19 +0000 |
commit | 31314773a00acd6cd26a4ad4b84001b6ed674ece (patch) | |
tree | 2938d9001dcfa3e334e77ec97c71952040846836 | |
parent | d1dae16fa01bc5aebc29decaea6901e8b1b75f54 (diff) | |
download | talk-31314773a00acd6cd26a4ad4b84001b6ed674ece.tar.gz |
AppRTCDemo(iOS): now works in the iOS Simulator!
...which has no camera device emulation or pass-through, so no local video
view.
R=noahric@google.com
Review URL: https://webrtc-codereview.appspot.com/10919004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@5815 4adac7df-926f-26a2-2b94-8c16560cd09d
-rw-r--r-- | app/webrtc/objc/RTCVideoRenderer.mm | 2 | ||||
-rw-r--r-- | examples/ios/AppRTCDemo/APPRTCAppDelegate.m | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/webrtc/objc/RTCVideoRenderer.mm b/app/webrtc/objc/RTCVideoRenderer.mm index f6eef1c..be3d205 100644 --- a/app/webrtc/objc/RTCVideoRenderer.mm +++ b/app/webrtc/objc/RTCVideoRenderer.mm @@ -142,6 +142,8 @@ class CallbackConverter : public webrtc::VideoRendererInterface { } - (void)stop { + [_activityIndicator stopAnimating]; + [_activityIndicator removeFromSuperview]; _iosRenderer->StopRender(); } diff --git a/examples/ios/AppRTCDemo/APPRTCAppDelegate.m b/examples/ios/AppRTCDemo/APPRTCAppDelegate.m index e8077b9..e251816 100644 --- a/examples/ios/AppRTCDemo/APPRTCAppDelegate.m +++ b/examples/ios/AppRTCDemo/APPRTCAppDelegate.m @@ -247,6 +247,11 @@ RTCMediaStream* lms = [self.peerConnectionFactory mediaStreamWithLabel:@"ARDAMS"]; + // The iOS simulator doesn't provide any sort of camera capture + // support or emulation (http://goo.gl/rHAnC1) so don't bother + // trying to open a local stream. + RTCVideoTrack* localVideoTrack; +#if !TARGET_IPHONE_SIMULATOR NSString* cameraID = nil; for (AVCaptureDevice* captureDevice in [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]) { @@ -262,12 +267,13 @@ self.videoSource = [self.peerConnectionFactory videoSourceWithCapturer:capturer constraints:self.client.videoConstraints]; - RTCVideoTrack* localVideoTrack = + localVideoTrack = [self.peerConnectionFactory videoTrackWithID:@"ARDAMSv0" source:self.videoSource]; if (localVideoTrack) { [lms addVideoTrack:localVideoTrack]; } +#endif [self.viewController.localVideoView renderVideoTrackInterface:localVideoTrack]; |