Add tracksubscribed event on downtrack added (#2934)

will remove this once the remote node has tracksubscribed
event sent.
This commit is contained in:
cnderrauber
2024-08-14 10:19:01 +08:00
committed by GitHub
parent c371929535
commit 8b47218270
2 changed files with 21 additions and 2 deletions
+1
View File
@@ -285,6 +285,7 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
sfu.WithLoadBalanceThreshold(20),
sfu.WithStreamTrackers(),
sfu.WithForwardStats(t.params.ForwardStats),
sfu.WithEverHasDownTrackAdded(t.OnTrackSubscribed),
)
newWR.OnCloseHandler(func() {
t.MediaTrackReceiver.SetClosing()