experiment fallback to tcp when udp unstable (#1119)

* fallback to tcp when udp unstable
This commit is contained in:
cnderrauber
2022-10-31 09:40:20 +08:00
committed by GitHub
parent 0aa8684f1c
commit 5edb42a9fd
5 changed files with 121 additions and 4 deletions
+5
View File
@@ -5,6 +5,7 @@ import (
"errors"
"sync"
"github.com/pion/rtcp"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v3/pkg/rtcerr"
"go.uber.org/atomic"
@@ -168,6 +169,10 @@ func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *
go sub.UpdateRTT(rtt)
})
downTrack.AddReceiverReportListener(func(dt *sfu.DownTrack, report *rtcp.ReceiverReport) {
sub.OnReceiverReport(dt, report)
})
var transceiver *webrtc.RTPTransceiver
var sender *webrtc.RTPSender