ObjC: Notify local video track

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 <deadbeef@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23458}
This commit is contained in:
Piasy Xu
2018-05-30 23:31:07 +08:00
committed by Commit Bot
parent 7941c8a6ba
commit e7e0602a0d
2 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,7 @@ Korniltsev Anatoly <korniltsev.anatoly@gmail.com>
Todd Wong <todd.wong.ndq@gmail.com>
Maxim Pavlov <pavllovmax@gmail.com>
Yusuke Suzuki <utatane.tea@gmail.com>
Piasy Xu <xz4215@gmail.com>
&yet LLC <*@andyet.com>
Agora IO <*@agora.io>

View File

@ -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.