From 98332408f1c1080512e48fa3d6d331adad91e252 Mon Sep 17 00:00:00 2001 From: Yohan Totting Date: Sat, 13 Jul 2024 10:01:36 +0700 Subject: [PATCH 1/2] upgrade to pion v4 --- bitratecontroller.go | 2 +- client.go | 4 +- client_test.go | 2 +- clienttrack.go | 2 +- clienttrackred.go | 2 +- clienttracksimulcast.go | 2 +- codec.go | 4 +- datachannel.go | 2 +- datachannel_test.go | 2 +- examples/http-websocket/main.go | 2 +- go.mod | 40 +++-- go.sum | 147 ++++++------------ helper_test.go | 2 +- iext_test.go | 2 +- manager.go | 2 +- peerconnection.go | 2 +- pkg/fakeclient/fakeclient.go | 2 +- pkg/interceptors/playoutdelay/interceptor.go | 2 +- pkg/interceptors/simulcast/interceptor.go | 2 +- .../voiceactivedetector/interceptor.go | 2 +- queue.go | 2 +- relaytrack.go | 2 +- remotetrack.go | 2 +- room.go | 2 +- room_stats.go | 2 +- room_test.go | 2 +- sfu.go | 2 +- sfu_test.go | 2 +- testhelper.go | 16 +- track.go | 2 +- track_test.go | 2 +- util.go | 2 +- 32 files changed, 108 insertions(+), 157 deletions(-) diff --git a/bitratecontroller.go b/bitratecontroller.go index d5265ca..e67b8a2 100644 --- a/bitratecontroller.go +++ b/bitratecontroller.go @@ -7,7 +7,7 @@ import ( "time" "github.com/pion/interceptor/pkg/cc" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) var ( diff --git a/client.go b/client.go index dbea128..8de2047 100644 --- a/client.go +++ b/client.go @@ -23,7 +23,7 @@ import ( "github.com/pion/interceptor/pkg/stats" "github.com/pion/logging" "github.com/pion/rtcp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type ClientState int @@ -416,7 +416,7 @@ func NewClient(s *SFU, id string, name string, peerConnectionConfig webrtc.Confi case webrtc.PeerConnectionStateNew: // do nothing client.startIdleTimeout(opts.IdleTimeout) - case webrtc.PeerConnectionState(webrtc.Unknown): + case webrtc.PeerConnectionState(webrtc.PeerConnectionStateUnknown): // clean up client.afterClosed() } diff --git a/client_test.go b/client_test.go index f7b0ba9..735d625 100644 --- a/client_test.go +++ b/client_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "github.com/stretchr/testify/require" ) diff --git a/clienttrack.go b/clienttrack.go index 8a45c7e..8c1acc7 100644 --- a/clienttrack.go +++ b/clienttrack.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type iClientTrack interface { diff --git a/clienttrackred.go b/clienttrackred.go index 72c01ca..7773f37 100644 --- a/clienttrackred.go +++ b/clienttrackred.go @@ -6,7 +6,7 @@ import ( "github.com/inlivedev/sfu/pkg/rtppool" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) var ( diff --git a/clienttracksimulcast.go b/clienttracksimulcast.go index dbc72d3..8f13001 100644 --- a/clienttracksimulcast.go +++ b/clienttracksimulcast.go @@ -7,7 +7,7 @@ import ( "github.com/inlivedev/sfu/pkg/packetmap" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type simulcastClientTrack struct { diff --git a/codec.go b/codec.go index 56636bd..7daa5a2 100644 --- a/codec.go +++ b/codec.go @@ -6,8 +6,8 @@ import ( "github.com/pion/rtp" "github.com/pion/rtp/codecs" - "github.com/pion/webrtc/v3" - "github.com/pion/webrtc/v3/pkg/media" + "github.com/pion/webrtc/v4" + "github.com/pion/webrtc/v4/pkg/media" "golang.org/x/exp/slices" ) diff --git a/datachannel.go b/datachannel.go index c39919c..9bc1f38 100644 --- a/datachannel.go +++ b/datachannel.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) var ( diff --git a/datachannel_test.go b/datachannel_test.go index a3ec0db..60e9072 100644 --- a/datachannel_test.go +++ b/datachannel_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "github.com/stretchr/testify/require" ) diff --git a/examples/http-websocket/main.go b/examples/http-websocket/main.go index 849f67f..74a983b 100644 --- a/examples/http-websocket/main.go +++ b/examples/http-websocket/main.go @@ -18,7 +18,7 @@ import ( "github.com/inlivedev/sfu/pkg/interceptors/voiceactivedetector" "github.com/inlivedev/sfu/pkg/networkmonitor" "github.com/pion/logging" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "golang.org/x/net/websocket" ) diff --git a/go.mod b/go.mod index 602b6e9..969e35b 100644 --- a/go.mod +++ b/go.mod @@ -7,39 +7,45 @@ go 1.21 require ( github.com/pion/ice/v2 v2.3.13 - github.com/pion/interceptor v0.1.25 - github.com/pion/rtcp v1.2.12 - github.com/pion/webrtc/v3 v3.2.32 + github.com/pion/interceptor v0.1.29 + github.com/pion/rtcp v1.2.14 github.com/stretchr/testify v1.9.0 ) require ( - github.com/golang/glog v1.1.2 github.com/jaevor/go-nanoid v1.3.0 + github.com/pion/webrtc/v4 v4.0.0-beta.21 golang.org/x/exp v0.0.0-20230905200255-921286631fa9 - golang.org/x/text v0.14.0 + golang.org/x/text v0.15.0 ) -require gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect +require ( + github.com/pion/ice/v3 v3.0.7 // indirect + github.com/pion/mdns/v2 v2.0.7 // indirect + github.com/pion/srtp/v3 v3.0.1 // indirect + github.com/pion/stun/v2 v2.0.0 // indirect + github.com/pion/transport/v3 v3.0.2 // indirect + github.com/pion/turn/v3 v3.0.3 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect +) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/google/uuid v1.3.1 - github.com/pion/datachannel v1.5.5 // indirect - github.com/pion/dtls/v2 v2.2.7 // indirect - github.com/pion/logging v0.2.2 // indirect + github.com/google/uuid v1.6.0 + github.com/pion/datachannel v1.5.6 // indirect + github.com/pion/dtls/v2 v2.2.11 // indirect + github.com/pion/logging v0.2.2 github.com/pion/mdns v0.0.12 // indirect github.com/pion/randutil v0.1.0 // indirect - github.com/pion/rtp v1.8.5 - github.com/pion/sctp v1.8.13 // indirect + github.com/pion/rtp v1.8.6 + github.com/pion/sctp v1.8.16 // indirect github.com/pion/sdp/v3 v3.0.9 - github.com/pion/srtp/v2 v2.0.18 // indirect github.com/pion/stun v0.6.1 // indirect - github.com/pion/transport/v2 v2.2.3 // indirect + github.com/pion/transport/v2 v2.2.4 // indirect github.com/pion/turn/v2 v2.1.3 github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/net v0.20.0 // direct - golang.org/x/sys v0.16.0 + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/net v0.25.0 // direct + golang.org/x/sys v0.20.0 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1c16bd3..1dc97f8 100644 --- a/go.sum +++ b/go.sum @@ -1,27 +1,9 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/jaevor/go-nanoid v1.3.0 h1:nD+iepesZS6pr3uOVf20vR9GdGgJW1HPaR46gtrxzkg= github.com/jaevor/go-nanoid v1.3.0/go.mod h1:SI+jFaPuddYkqkVQoNGHs81navCtH388TcrH0RqFKgY= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -30,180 +12,143 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8= -github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0= -github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= +github.com/pion/datachannel v1.5.6 h1:1IxKJntfSlYkpUj8LlYRSWpYiTTC02nUrOE8T3DqGeg= +github.com/pion/datachannel v1.5.6/go.mod h1:1eKT6Q85pRnr2mHiWHxJwO50SfZRtWHTsNIVb/NfGW4= github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/dtls/v2 v2.2.11 h1:9U/dpCYl1ySttROPWJgqWKEylUdT0fXp/xst6JwY5Ks= +github.com/pion/dtls/v2 v2.2.11/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= github.com/pion/ice/v2 v2.3.13 h1:xOxP+4V9nSDlUaGFRf/LvAuGHDXRcjIdsbbXPK/w7c8= github.com/pion/ice/v2 v2.3.13/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= -github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc= -github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y= +github.com/pion/ice/v3 v3.0.7 h1:dfMViRKblENqzorR2cQiiRKWqQfqKZ9+nT/sREX3ra8= +github.com/pion/ice/v3 v3.0.7/go.mod h1:pBRcCoJRC0vwvFsemfRIqRLYukV4bPboGb0B4b8AhrQ= +github.com/pion/interceptor v0.1.29 h1:39fsnlP1U8gw2JzOFWdfCU82vHvhW9o0rZnZF56wF+M= +github.com/pion/interceptor v0.1.29/go.mod h1:ri+LGNjRUc5xUNtDEPzfdkmSqISixVTBF/z/Zms/6T4= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8= github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk= +github.com/pion/mdns/v2 v2.0.7 h1:c9kM8ewCgjslaAmicYMFQIde2H9/lrZpjBkN8VwoVtM= +github.com/pion/mdns/v2 v2.0.7/go.mod h1:vAdSYNAT0Jy3Ru0zl2YiW3Rm/fJCwIeM0nToenfOJKA= github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= -github.com/pion/rtcp v1.2.10/go.mod h1:ztfEwXZNLGyF1oQDttz/ZKIBaeeg/oWbRYqzBM9TL1I= -github.com/pion/rtcp v1.2.12 h1:bKWiX93XKgDZENEXCijvHRU/wRifm6JV5DGcH6twtSM= github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= -github.com/pion/rtp v1.8.2/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE= +github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/rtp v1.8.5 h1:uYzINfaK+9yWs7r537z/Rc1SvT8ILjBcmDOpJcTB+OU= -github.com/pion/rtp v1.8.5/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= -github.com/pion/sctp v1.8.13 h1:YUJR44pWM2FPUhkl8l+vDyF2EDE3aTWtr3c+LDhCRcQ= +github.com/pion/rtp v1.8.6 h1:MTmn/b0aWWsAzux2AmP8WGllusBVw4NPYPVFFd7jUPw= +github.com/pion/rtp v1.8.6/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/sctp v1.8.13/go.mod h1:YKSgO/bO/6aOMP9LCie1DuD7m+GamiK2yIiPM6vH+GA= +github.com/pion/sctp v1.8.16 h1:PKrMs+o9EMLRvFfXq59WFsC+V8mN1wnKzqrv+3D/gYY= +github.com/pion/sctp v1.8.16/go.mod h1:P6PbDVA++OJMrVNg2AL3XtYHV4uD6dvfyOovCgMs0PE= github.com/pion/sdp/v3 v3.0.9 h1:pX++dCHoHUwq43kuwf3PyJfHlwIj4hXA7Vrifiq0IJY= github.com/pion/sdp/v3 v3.0.9/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M= -github.com/pion/srtp/v2 v2.0.18 h1:vKpAXfawO9RtTRKZJbG4y0v1b11NZxQnxRl85kGuUlo= -github.com/pion/srtp/v2 v2.0.18/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA= +github.com/pion/srtp/v3 v3.0.1 h1:AkIQRIZ+3tAOJMQ7G301xtrD1vekQbNeRO7eY1K8ZHk= +github.com/pion/srtp/v3 v3.0.1/go.mod h1:3R3a1qIOIxBkVTLGFjafKK6/fJoTdQDhcC67HOyMbJ8= github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= -github.com/pion/transport v0.14.1 h1:XSM6olwW+o8J4SCmOBb/BpwZypkHeyM0PGFCxNQBr40= -github.com/pion/transport v0.14.1/go.mod h1:4tGmbk00NeYA3rUa9+n+dzCCoKkcy3YlYb99Jn2fNnI= +github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= +github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= github.com/pion/transport/v2 v2.2.2/go.mod h1:OJg3ojoBJopjEeECq2yJdXH9YVrUJ1uQ++NjXLOUorc= -github.com/pion/transport/v2 v2.2.3 h1:XcOE3/x41HOSKbl1BfyY1TF1dERx7lVvlMCbXU7kfvA= -github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= -github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= +github.com/pion/transport/v2 v2.2.4 h1:41JJK6DZQYSeVLxILA2+F4ZkKb4Xd/tFJZRFZQ9QAlo= +github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= +github.com/pion/transport/v3 v3.0.2 h1:r+40RJR25S9w3jbA6/5uEPTzcdn7ncyU44RWCbHkLg4= +github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37m0IlWa/D0= github.com/pion/turn/v2 v2.1.3 h1:pYxTVWG2gpC97opdRc5IGsQ1lJ9O/IlNhkzj7MMrGAA= github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= -github.com/pion/webrtc/v3 v3.2.32 h1:AGARHapcj1L9py06mbf0V/zgQ5cPqboSoNxr9Ck/TZU= -github.com/pion/webrtc/v3 v3.2.32/go.mod h1:8nsXAU16J1wabqt93u1PwwhkCbGrA/B143sRepFzJ1Y= +github.com/pion/turn/v3 v3.0.3 h1:1e3GVk8gHZLPBA5LqadWYV60lmaKUaHCkm9DX9CkGcE= +github.com/pion/turn/v3 v3.0.3/go.mod h1:vw0Dz420q7VYAF3J4wJKzReLHIo2LGp4ev8nXQexYsc= +github.com/pion/webrtc/v4 v4.0.0-beta.21 h1:am2ZwmEWCRzAqNmMd4jmALHzookYQdgPs5uXOIHESVY= +github.com/pion/webrtc/v4 v4.0.0-beta.21/go.mod h1:tBa/6GmW34fT7UURDdj7kwJlAW9NLEkeHKP1jAonhXY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/helper_test.go b/helper_test.go index 82727ae..f6cae6c 100644 --- a/helper_test.go +++ b/helper_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type PeerClient struct { diff --git a/iext_test.go b/iext_test.go index 55856a8..af40498 100644 --- a/iext_test.go +++ b/iext_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "github.com/stretchr/testify/require" ) diff --git a/manager.go b/manager.go index c382c0e..26d224d 100644 --- a/manager.go +++ b/manager.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/pion/logging" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) var ( diff --git a/peerconnection.go b/peerconnection.go index d288fc6..6449095 100644 --- a/peerconnection.go +++ b/peerconnection.go @@ -3,7 +3,7 @@ package sfu import ( "sync" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type PeerConnection struct { diff --git a/pkg/fakeclient/fakeclient.go b/pkg/fakeclient/fakeclient.go index b76925c..cc65895 100644 --- a/pkg/fakeclient/fakeclient.go +++ b/pkg/fakeclient/fakeclient.go @@ -6,7 +6,7 @@ import ( "github.com/inlivedev/sfu" "github.com/pion/interceptor/pkg/stats" "github.com/pion/logging" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type FakeClient struct { diff --git a/pkg/interceptors/playoutdelay/interceptor.go b/pkg/interceptors/playoutdelay/interceptor.go index 442f250..9bd5b89 100644 --- a/pkg/interceptors/playoutdelay/interceptor.go +++ b/pkg/interceptors/playoutdelay/interceptor.go @@ -4,7 +4,7 @@ import ( "github.com/pion/interceptor" "github.com/pion/logging" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type InterceptorFactory struct { diff --git a/pkg/interceptors/simulcast/interceptor.go b/pkg/interceptors/simulcast/interceptor.go index 0e51229..ddb859f 100644 --- a/pkg/interceptors/simulcast/interceptor.go +++ b/pkg/interceptors/simulcast/interceptor.go @@ -6,7 +6,7 @@ import ( "github.com/pion/interceptor" "github.com/pion/rtp" "github.com/pion/sdp/v3" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type InterceptorFactory struct { diff --git a/pkg/interceptors/voiceactivedetector/interceptor.go b/pkg/interceptors/voiceactivedetector/interceptor.go index d9d42a9..fffdcfd 100644 --- a/pkg/interceptors/voiceactivedetector/interceptor.go +++ b/pkg/interceptors/voiceactivedetector/interceptor.go @@ -9,7 +9,7 @@ import ( "github.com/pion/logging" "github.com/pion/rtp" "github.com/pion/sdp/v3" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) const ATTRIBUTE_KEY = "audioLevel" diff --git a/queue.go b/queue.go index 9d72bbe..c18e43e 100644 --- a/queue.go +++ b/queue.go @@ -7,7 +7,7 @@ import ( "sync/atomic" "github.com/pion/logging" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) var ( diff --git a/relaytrack.go b/relaytrack.go index 82eea74..823d4c4 100644 --- a/relaytrack.go +++ b/relaytrack.go @@ -7,7 +7,7 @@ import ( "github.com/pion/interceptor" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type IRemoteTrack interface { diff --git a/remotetrack.go b/remotetrack.go index 264dad3..ee777c5 100644 --- a/remotetrack.go +++ b/remotetrack.go @@ -14,7 +14,7 @@ import ( "github.com/pion/interceptor/pkg/stats" "github.com/pion/logging" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type remoteTrack struct { diff --git a/room.go b/room.go index 25fcf77..520bc0e 100644 --- a/room.go +++ b/room.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) const ( diff --git a/room_stats.go b/room_stats.go index 47f52a2..f1e9bd5 100644 --- a/room_stats.go +++ b/room_stats.go @@ -3,7 +3,7 @@ package sfu import ( "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) type StatTracks struct { diff --git a/room_test.go b/room_test.go index 6dca8df..10951e3 100644 --- a/room_test.go +++ b/room_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "github.com/stretchr/testify/require" ) diff --git a/sfu.go b/sfu.go index 99e51c9..0ab198a 100644 --- a/sfu.go +++ b/sfu.go @@ -7,7 +7,7 @@ import ( "github.com/pion/logging" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "golang.org/x/exp/slices" ) diff --git a/sfu_test.go b/sfu_test.go index a5b2a37..d7f2dd6 100644 --- a/sfu_test.go +++ b/sfu_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "github.com/stretchr/testify/require" ) diff --git a/testhelper.go b/testhelper.go index d3fc6b7..d048f38 100644 --- a/testhelper.go +++ b/testhelper.go @@ -16,13 +16,13 @@ import ( "github.com/pion/interceptor" "github.com/pion/interceptor/pkg/stats" "github.com/pion/logging" - "github.com/pion/webrtc/v3" - "github.com/pion/webrtc/v3/pkg/media" + "github.com/pion/webrtc/v4" + "github.com/pion/webrtc/v4/pkg/media" - "github.com/pion/webrtc/v3/pkg/media/h264reader" - "github.com/pion/webrtc/v3/pkg/media/ivfreader" + "github.com/pion/webrtc/v4/pkg/media/h264reader" + "github.com/pion/webrtc/v4/pkg/media/ivfreader" - "github.com/pion/webrtc/v3/pkg/media/oggreader" + "github.com/pion/webrtc/v4/pkg/media/oggreader" ) var mediaEngine *webrtc.MediaEngine @@ -617,11 +617,11 @@ func CreateDataPair(ctx context.Context, log logging.LeveledLogger, room *Room, pc.OnDataChannel(onDataChannel) - if _, err := pc.AddTransceiverFromKind(webrtc.RTPCodecTypeVideo, webrtc.RtpTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { + if _, err := pc.AddTransceiverFromKind(webrtc.RTPCodecTypeVideo, webrtc.RTPTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { panic(err) } - if _, err := pc.AddTransceiverFromKind(webrtc.RTPCodecTypeAudio, webrtc.RtpTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { + if _, err := pc.AddTransceiverFromKind(webrtc.RTPCodecTypeAudio, webrtc.RTPTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { panic(err) } @@ -722,7 +722,7 @@ func LoadVp9Track(ctx context.Context, log logging.LeveledLogger, pc *webrtc.Pee panic(videoTrackErr) } - transcv, videoTrackErr := pc.AddTransceiverFromTrack(videoTrack, webrtc.RtpTransceiverInit{ + transcv, videoTrackErr := pc.AddTransceiverFromTrack(videoTrack, webrtc.RTPTransceiverInit{ Direction: webrtc.RTPTransceiverDirectionSendrecv, }) diff --git a/track.go b/track.go index d0d8419..0b24b8e 100644 --- a/track.go +++ b/track.go @@ -12,7 +12,7 @@ import ( "github.com/pion/interceptor/pkg/stats" "github.com/pion/logging" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) const ( diff --git a/track_test.go b/track_test.go index 5eb76d8..b0e505a 100644 --- a/track_test.go +++ b/track_test.go @@ -7,7 +7,7 @@ import ( "github.com/pion/interceptor" "github.com/pion/rtp" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" ) func TestVoiceActivityDetection(t *testing.T) { diff --git a/util.go b/util.go index 2b390a8..e77c0aa 100644 --- a/util.go +++ b/util.go @@ -18,7 +18,7 @@ import ( "github.com/pion/rtp/codecs" "github.com/pion/sdp/v3" "github.com/pion/turn/v2" - "github.com/pion/webrtc/v3" + "github.com/pion/webrtc/v4" "golang.org/x/text/language" "golang.org/x/text/message" ) From 86352c5e4e32c426345348f4f8c9376f8534d144 Mon Sep 17 00:00:00 2001 From: Yohan Totting Date: Sat, 13 Jul 2024 18:16:23 +0700 Subject: [PATCH 2/2] feat: add dtx on opus codec --- client.go | 82 ++++++++++++++++++++++++++---- examples/http-websocket/index.html | 73 ++++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 10 deletions(-) diff --git a/client.go b/client.go index 8de2047..70a2351 100644 --- a/client.go +++ b/client.go @@ -60,26 +60,28 @@ var ( ) type ClientOptions struct { - IdleTimeout time.Duration - Type string - EnableVoiceDetection bool - EnablePlayoutDelay bool + IdleTimeout time.Duration `json:"idle_timeout"` + Type string `json:"type"` + EnableVoiceDetection bool `json:"enable_voice_detection"` + EnablePlayoutDelay bool `json:"enable_playout_delay"` + EnableOpusDTX bool `json:"enable_opus_dtx"` + EnableOpusInbandFEC bool `json:"enable_opus_inband_fec"` // Configure the minimum playout delay that will be used by the client // Recommendation: // 0 ms: Certain gaming scenarios (likely without audio) where we will want to play the frame as soon as possible. Also, for remote desktop without audio where rendering a frame asap makes sense // 100/150/200 ms: These could be the max target latency for interactive streaming use cases depending on the actual application (gaming, remoting with audio, interactive scenarios) // 400 ms: Application that want to ensure a network glitch has very little chance of causing a freeze can start with a minimum delay target that is high enough to deal with network issues. Video streaming is one example. - MinPlayoutDelay uint16 + MinPlayoutDelay uint16 `json:"min_playout_delay"` // Configure the minimum playout delay that will be used by the client // Recommendation: // 0 ms: Certain gaming scenarios (likely without audio) where we will want to play the frame as soon as possible. Also, for remote desktop without audio where rendering a frame asap makes sense // 100/150/200 ms: These could be the max target latency for interactive streaming use cases depending on the actual application (gaming, remoting with audio, interactive scenarios) // 400 ms: Application that want to ensure a network glitch has very little chance of causing a freeze can start with a minimum delay target that is high enough to deal with network issues. Video streaming is one example. - MaxPlayoutDelay uint16 - JitterBufferMinWait time.Duration - JitterBufferMaxWait time.Duration + MaxPlayoutDelay uint16 `json:"max_playout_delay"` + JitterBufferMinWait time.Duration `json:"jitter_buffer_min_wait"` + JitterBufferMaxWait time.Duration `json:"jitter_buffer_max_wait"` // On unstable network, the packets can be arrived unordered which may affected the nack and packet loss counts, set this to true to allow the SFU to handle reordered packet - ReorderPackets bool + ReorderPackets bool `json:"reorder_packets"` Log logging.LeveledLogger } @@ -184,6 +186,8 @@ func DefaultClientOptions() ClientOptions { Type: ClientTypePeer, EnableVoiceDetection: true, EnablePlayoutDelay: true, + EnableOpusDTX: true, + EnableOpusInbandFEC: true, MinPlayoutDelay: 100, MaxPlayoutDelay: 200, JitterBufferMinWait: 20 * time.Millisecond, @@ -742,7 +746,65 @@ func (c *Client) negotiateQueuOp(offer webrtc.SessionDescription) (*webrtc.Sessi c.pendingRemoteCandidates = nil - return c.peerConnection.PC().LocalDescription(), nil + sdp := c.setOpusSDP(*c.peerConnection.PC().LocalDescription()) + + return &sdp, nil +} + +func (c *Client) setOpusSDP(sdp webrtc.SessionDescription) webrtc.SessionDescription { + if c.options.EnableOpusDTX { + var regex, err = regexp.Compile(`a=rtpmap:(\d+) opus\/(\d+)\/(\d+)`) + if err != nil { + c.log.Errorf("client: error on compile regex ", err) + return sdp + } + var opusLine = regex.FindString(sdp.SDP) + + if opusLine == "" { + c.log.Errorf("client: error opus line not found") + return sdp + } + + regex, err = regexp.Compile(`(\d+)`) + if err != nil { + c.log.Errorf("client: error on compile regex ", err) + return sdp + } + + var opusNo = regex.FindString(opusLine) + if opusNo == "" { + c.log.Errorf("client: error opus no not found") + return sdp + } + + fmtpRegex, err := regexp.Compile(`a=fmtp:` + opusNo + ` .+`) + if err != nil { + c.log.Errorf("client: error on compile regex ", err) + return sdp + } + + var fmtpLine = fmtpRegex.FindString(sdp.SDP) + if fmtpLine == "" { + c.log.Errorf("client: error fmtp line not found") + return sdp + } + + var newFmtpLine = "" + + if c.options.EnableOpusDTX && !strings.Contains(fmtpLine, "usedtx=1") { + newFmtpLine += ";usedtx=1" + } + + if c.options.EnableOpusInbandFEC && !strings.Contains(fmtpLine, "useinbandfec=1") { + newFmtpLine += ";useinbandfec=1" + } + + if newFmtpLine != "" { + sdp.SDP = strings.Replace(sdp.SDP, fmtpLine, fmtpLine+newFmtpLine, -1) + } + } + + return sdp } func (c *Client) renegotiate() { diff --git a/examples/http-websocket/index.html b/examples/http-websocket/index.html index bd2124f..3e00b4b 100644 --- a/examples/http-websocket/index.html +++ b/examples/http-websocket/index.html @@ -153,6 +153,30 @@ const maxBw = 2500*1000 + let mutedMic = false + + let mutedCam = false + + const toggleMic = async (e) => { + peerConnection.getSenders().forEach(sender => { + if (sender.track.kind === 'audio') { + sender.track.enabled = !mutedMic + mutedMic = !mutedMic + e.target.innerText = !sender.track.enabled?'Unmute Mic':'Mute Mic' + } + }) + } + + const toggleCam = async (e) => { + peerConnection.getSenders().forEach(sender => { + if (sender.track.kind === 'video') { + sender.track.enabled = !mutedCam + mutedCam = !mutedCam + e.target.innerText = !sender.track.enabled?'Unmute Cam':'Mute Cam' + } + }) + } + const startWs =async ()=>{ let debug = false const urlParams = new URLSearchParams(window.location.search); @@ -273,6 +297,49 @@ start('vp9') } + function setOpusSDP(sdp){ + let fmtlineOpus = '' + + let fmtNo = null + // find fmtline for opus from SDP + const opusFmtLines = sdp.match(/a=rtpmap:(\d+) opus\/(\d+)\/(\d+)/) + if (opusFmtLines) { + // extract only the first digit + const matchesNo = opusFmtLines[0].match(/(\d+)/) + if (matchesNo) { + fmtNo = matchesNo[0] + } + } + + console.log('fmtNo', fmtNo) + + // find fmtp line for opus from SDP + const opusFmtpLines = sdp.match(new RegExp(`a=fmtp:${fmtNo} .+`)) + if (opusFmtpLines) { + fmtlineOpus = opusFmtpLines[0] + } + + // check if DTX is enabled and if not, add it to the SDP + if (!fmtlineOpus.includes('usedtx=1')) { + fmtlineOpus += ';usedtx=1' + } + + // check if inbandfec is enabled and if not, add it to the SDP + if (!fmtlineOpus.includes('useinbandfec=1')) { + fmtlineOpus += ';useinbandfec=1' + } + + console.log('fmtlineOpus', fmtlineOpus) + + // replace the old fmtp line with the new one + sdp = sdp.replace( + new RegExp(`a=fmtp:${fmtNo} .+`), + `a=fmtp:${fmtNo} ${fmtlineOpus}` + ) + + return sdp + } + async function start(codec) { await startWs() document.getElementById("btnStart").disabled = true; @@ -553,6 +620,8 @@ } const offer=await peerConnection.createOffer() + + // offer.sdp = setOpusSDP(offer.sdp) await peerConnection.setLocalDescription(offer) @@ -957,6 +1026,8 @@

Low

document.addEventListener("DOMContentLoaded", function(event) { document.getElementById("btnStart").onclick = startH264; document.getElementById("btnStartVP9").onclick = startVP9; + document.getElementById("btnToggleMic").onclick = toggleMic; + document.getElementById("btnToggleCam").onclick = toggleCam; document.getElementById("btnShareScreen").onclick = shareScreen; document.getElementById("btnStats").onclick = toggleStats; document.getElementById("selectQuality").onchange = switchQuality; @@ -979,6 +1050,8 @@

Outbound Video