upgrade to pion/webrtc v4 (#3213)

This commit is contained in:
cnderrauber
2024-11-28 16:05:38 +08:00
committed by GitHub
parent baf47db834
commit 54f9f7de51
52 changed files with 144 additions and 119 deletions
+9 -1
View File
@@ -27,7 +27,7 @@ import (
lru "github.com/hashicorp/golang-lru/v2"
"github.com/pion/rtcp"
"github.com/pion/sdp/v3"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"github.com/pkg/errors"
"go.uber.org/atomic"
"google.golang.org/protobuf/proto"
@@ -1458,6 +1458,10 @@ func (h AnyTransportHandler) OnFailed(_isShortLived bool, _ici *types.ICEConnect
h.p.onAnyTransportFailed()
}
func (h AnyTransportHandler) OnClosed() {
h.p.onAnyTransportClosed()
}
func (h AnyTransportHandler) OnNegotiationFailed() {
h.p.onAnyTransportNegotiationFailed()
}
@@ -2023,6 +2027,10 @@ func (p *ParticipantImpl) onAnyTransportFailed() {
p.setupDisconnectTimer()
}
func (p *ParticipantImpl) onAnyTransportClosed() {
_ = p.Close(false, types.ParticipantCloseReasonPeerConnectionDisconnected, false)
}
// subscriberRTCPWorker sends SenderReports periodically when the participant is subscribed to
// other publishedTracks in the room.
func (p *ParticipantImpl) subscriberRTCPWorker() {