From e7e0602a0da3acbf4b6a808a113f31ee89e1879b Mon Sep 17 00:00:00 2001 From: Piasy Xu Date: Wed, 30 May 2018 23:31:07 +0800 Subject: [PATCH] ObjC: Notify local video track MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macOS demo add camera preview in didReceiveLocalVideoTrack callback, but this callback is never called. Bug: webrtc:9276 Change-Id: I60b9cc69672f3654d4e36de0e8140e0bbb957540 Reviewed-on: https://webrtc-review.googlesource.com/77950 Commit-Queue: Taylor Brandstetter Reviewed-by: Kári Helgason Cr-Commit-Position: refs/heads/master@{#23458} --- AUTHORS | 1 + examples/objc/AppRTCMobile/ARDAppClient.m | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index 83a74af633..15f2589e05 100644 --- a/AUTHORS +++ b/AUTHORS @@ -62,6 +62,7 @@ Korniltsev Anatoly Todd Wong Maxim Pavlov Yusuke Suzuki +Piasy Xu &yet LLC <*@andyet.com> Agora IO <*@agora.io> diff --git a/examples/objc/AppRTCMobile/ARDAppClient.m b/examples/objc/AppRTCMobile/ARDAppClient.m index b3fb2495c8..11c6e34cbe 100644 --- a/examples/objc/AppRTCMobile/ARDAppClient.m +++ b/examples/objc/AppRTCMobile/ARDAppClient.m @@ -696,6 +696,7 @@ static int const kKbpsMultiplier = 1000; _localVideoTrack = [self createLocalVideoTrack]; if (_localVideoTrack) { [_peerConnection addTrack:_localVideoTrack streamIds:@[ kARDMediaStreamId ]]; + [_delegate appClient:self didReceiveLocalVideoTrack:_localVideoTrack]; // We can set up rendering for the remote track right away since the transceiver already has an // RTCRtpReceiver with a track. The track will automatically get unmuted and produce frames // once RTP is received.