RTCPeerConnection-setRemoteDescription-simulcast.https.html (1564B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>RTCPeerConnection.prototype.setRemoteDescription rollback</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="RTCPeerConnection-helper.js"></script> 7 <script> 8 'use strict'; 9 // Test for https://github.com/w3c/webrtc-pc/pull/2155 10 promise_test(async t => { 11 const pc = new RTCPeerConnection(); 12 t.add_cleanup(() => pc.close()); 13 const [track, stream] = await getTrackFromUserMedia('video'); 14 t.add_cleanup(() => track.stop()); 15 16 pc.addTrack(track, stream); 17 18 const offer_sdp = `v=0 19 o=- 3840232462471583827 2 IN IP4 127.0.0.1 20 s=- 21 t=0 0 22 a=group:BUNDLE 0 23 a=msid-semantic: WMS 24 m=video 9 UDP/TLS/RTP/SAVPF 96 25 c=IN IP4 0.0.0.0 26 a=rtcp:9 IN IP4 0.0.0.0 27 a=ice-ufrag:Li6+ 28 a=ice-pwd:3C05CTZBRQVmGCAq7hVasHlT 29 a=ice-options:trickle 30 a=fingerprint:sha-256 5B:D3:8E:66:0E:7D:D3:F3:8E:E6:80:28:19:FC:55:AD:58:5D:B9:3D:A8:DE:45:4A:E7:87:02:F8:3C:0B:3B:B3 31 a=setup:actpass 32 a=mid:0 33 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid 34 a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id 35 a=recvonly 36 a=rtcp-mux 37 a=rtpmap:96 VP8/90000 38 a=rtcp-fb:96 goog-remb 39 a=rtcp-fb:96 transport-cc 40 a=rtcp-fb:96 ccm fir 41 a=rid:foo recv 42 a=rid:bar recv 43 a=rid:baz recv 44 a=simulcast:recv foo;bar;baz 45 `; 46 47 await pc.setRemoteDescription({type: 'offer', sdp: offer_sdp}); 48 const transceivers = pc.getTransceivers(); 49 assert_equals(transceivers.length, 1, 'Expected exactly one transceiver'); 50 }, 'createAnswer() attaches to an existing transceiver with a remote simulcast offer'); 51 </script>