diff --git a/talk/app/webrtc/objc/RTCVideoRenderer.mm b/talk/app/webrtc/objc/RTCVideoRenderer.mm index f6eef1c0b8..be3d2051b9 100644 --- a/talk/app/webrtc/objc/RTCVideoRenderer.mm +++ b/talk/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/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.m b/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.m index e8077b9620..e251816728 100644 --- a/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.m +++ b/talk/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];