Index: webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m |
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m |
index 8de6b959f026150a13fa87be3d1bd9026890096f..51290a05b585bed47fe4074f17bf80b0cbec5026 100644 |
--- a/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m |
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m |
@@ -128,18 +128,21 @@ |
if (_localVideoTrack == localVideoTrack) { |
return; |
} |
- [_localVideoTrack removeRenderer:_videoCallView.localVideoView]; |
_localVideoTrack = nil; |
- [_videoCallView.localVideoView renderFrame:nil]; |
_localVideoTrack = localVideoTrack; |
- [_localVideoTrack addRenderer:_videoCallView.localVideoView]; |
+ RTCAVFoundationVideoSource *source = nil; |
+ if ([localVideoTrack.source |
+ isKindOfClass:[RTCAVFoundationVideoSource class]]) { |
+ source = (RTCAVFoundationVideoSource*)localVideoTrack.source; |
+ } |
+ _videoCallView.localVideoView.captureSession = source.captureSession; |
} |
- (void)setRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack { |
if (_remoteVideoTrack == remoteVideoTrack) { |
return; |
} |
- [_remoteVideoTrack removeRenderer:_videoCallView.localVideoView]; |
+ [_remoteVideoTrack removeRenderer:_videoCallView.remoteVideoView]; |
_remoteVideoTrack = nil; |
[_videoCallView.remoteVideoView renderFrame:nil]; |
_remoteVideoTrack = remoteVideoTrack; |