Skip to content

Commit

Permalink
Merge pull request #14175 from jan-ivar/mergefix
Browse files Browse the repository at this point in the history
Fix bad merge 'Merge branch 'master' into gecko/1498793'.
  • Loading branch information
jan-ivar authored Nov 22, 2018
2 parents a89730a + 379c165 commit deaca4f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions webrtc/RTCRtpTransceiver.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,26 @@
hasProps(pc.getTransceivers(), []);
};

const checkMsidNoTrackId = async t => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
t.add_cleanup(() => pc2.close());
const stream = await navigator.mediaDevices.getUserMedia({audio: true});
t.add_cleanup(() => stopTracks(stream));
const track = stream.getAudioTracks()[0];
pc1.addTrack(track, stream);
const offer = await pc1.createOffer();
await pc1.setLocalDescription(offer);
// Remove track-id from msid
offer.sdp = offer.sdp.replace(/(a=msid:[^ \t]+).*\r\n/g, "$1\r\n");
assert_true(offer.sdp.includes(`a=msid:${stream.id}\r\n`));
await pc2.setRemoteDescription(offer);
const answer = await pc2.createAnswer();
await pc1.setRemoteDescription(answer);
await pc2.setLocalDescription(answer);
};

const checkNoMidOffer = async t => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
]);

const offer = await pc.createOffer();
assert_true(offer.sdp.includes("a=msid:" + audioStream.id + " " + audio.id),
assert_true(offer.sdp.includes("a=msid:" + audioStream.id),
"offer contains the expected audio msid");
assert_true(offer.sdp.includes("a=msid:" + videoStream.id + " " + video.id),
assert_true(offer.sdp.includes("a=msid:" + videoStream.id),
"offer contains the expected video msid");
};

Expand Down

0 comments on commit deaca4f

Please sign in to comment.