Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
3.5 kB · 117 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118package media
import ( "context" "testing"
"github.com/pion/webrtc/v4" "github.com/stretchr/testify/require" "go.uber.org/goleak")
func TestWebRTCPlayback2(t *testing.T) { mm, _ := getStaticTestMediaManager(t) ignore := goleak.IgnoreCurrent() defer goleak.VerifyNone(t, ignore) offer := &webrtc.SessionDescription{ Type: webrtc.SDPTypeOffer, SDP: firefoxNoH264SDP, } answer, err := mm.WebRTCPlayback2(context.Background(), "test-user", "test-rendition", offer, "") require.ErrorContains(t, err, "RTPSender created with no codecs") require.Nil(t, answer)}
var firefoxNoH264SDP = `v=0o=mozilla...THIS_IS_SDPARTA-99.0 2400864153024665403 0 IN IP4 0.0.0.0s=-t=0 0a=sendrecva=fingerprint:sha-256 9A:55:EE:77:40:E7:C9:7F:DB:1A:D4:33:7C:06:9B:07:AE:CE:0F:06:52:1E:DE:5B:8B:A6:65:4C:48:C6:73:15a=group:BUNDLE 0 1a=ice-options:tricklea=msid-semantic:WMS *m=video 9 UDP/TLS/RTP/SAVPF 120 124 121 125 99 100 123 122 119c=IN IP4 0.0.0.0a=candidate:0 1 UDP 2122252543 f2fe908b-a599-4c2b-8e5b-411fb045e57a.local 58949 typ hosta=candidate:1 1 TCP 2105524479 f2fe908b-a599-4c2b-8e5b-411fb045e57a.local 9 typ host tcptype activea=candidate:0 2 UDP 2122252542 f2fe908b-a599-4c2b-8e5b-411fb045e57a.local 52046 typ hosta=candidate:1 2 TCP 2105524478 f2fe908b-a599-4c2b-8e5b-411fb045e57a.local 9 typ host tcptype activea=recvonlya=end-of-candidatesa=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mida=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:5 urn:ietf:params:rtp-hdrext:toffseta=extmap:6/recvonly http://www.webrtc.org/experiments/rtp-hdrext/playout-delaya=extmap:7 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap-allow-mixeda=fmtp:120 max-fs=12288;max-fr=60a=fmtp:124 apt=120a=fmtp:121 max-fs=12288;max-fr=60a=fmtp:125 apt=121a=fmtp:100 apt=99a=fmtp:119 apt=122a=ice-pwd:073b56d923776f7889e9f31dd122eaf5a=ice-ufrag:9ba3b1bfa=mid:0a=rtcp:52046 IN IP4 f2fe908b-a599-4c2b-8e5b-411fb045e57a.locala=rtcp-fb:120 nacka=rtcp-fb:120 nack plia=rtcp-fb:120 ccm fira=rtcp-fb:120 goog-remba=rtcp-fb:120 transport-cca=rtcp-fb:121 nacka=rtcp-fb:121 nack plia=rtcp-fb:121 ccm fira=rtcp-fb:121 goog-remba=rtcp-fb:121 transport-cca=rtcp-fb:99 nacka=rtcp-fb:99 nack plia=rtcp-fb:99 ccm fira=rtcp-fb:99 goog-remba=rtcp-fb:99 transport-cca=rtcp-fb:123 nacka=rtcp-fb:123 nack plia=rtcp-fb:123 ccm fira=rtcp-fb:123 goog-remba=rtcp-fb:123 transport-cca=rtcp-fb:122 nacka=rtcp-fb:122 nack plia=rtcp-fb:122 ccm fira=rtcp-fb:122 goog-remba=rtcp-fb:122 transport-cca=rtcp-muxa=rtcp-rsizea=rtpmap:120 VP8/90000a=rtpmap:124 rtx/90000a=rtpmap:121 VP9/90000a=rtpmap:125 rtx/90000a=rtpmap:99 AV1/90000a=rtpmap:100 rtx/90000a=rtpmap:123 ulpfec/90000a=rtpmap:122 red/90000a=rtpmap:119 rtx/90000a=setup:actpassa=ssrc:3998233880 cname:{d6f4dc1f-0f71-4a23-8ba7-8c95370e5479}m=audio 0 UDP/TLS/RTP/SAVPF 109 9 0 8 101c=IN IP4 0.0.0.0a=bundle-onlya=recvonlya=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-levela=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-levela=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mida=extmap-allow-mixeda=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1a=fmtp:101 0-15a=ice-pwd:073b56d923776f7889e9f31dd122eaf5a=ice-ufrag:9ba3b1bfa=mid:1a=rtcp-muxa=rtpmap:109 opus/48000/2a=rtpmap:9 G722/8000/1a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:101 telephone-event/8000a=setup:actpassa=ssrc:543748180 cname:{d6f4dc1f-0f71-4a23-8ba7-8c95370e5479}`