Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1495569] Create answers with a=mid even if the offer did not have a=mid #13587

Merged
merged 1 commit into from
Oct 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions webrtc/RTCRtpTransceiver.https.html
Original file line number Diff line number Diff line change
@@ -506,6 +506,40 @@
hasProps(pc.getTransceivers(), []);
};

const checkNoMidOffer = 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 mid attr
offer.sdp = offer.sdp.replace("a=mid:", "a=unknownattr:");
await pc2.setRemoteDescription(offer);

hasPropsAndUniqueMids(pc2.getTransceivers(),
[
{
receiver: {track: {kind: "audio"}},
sender: {track: null},
direction: "recvonly",
currentDirection: null,
stopped: false
}
]);

const answer = await pc2.createAnswer();
await pc2.setLocalDescription(answer);
await pc1.setRemoteDescription(answer);
};

const checkAddTransceiverNoTrackDoesntPair = async t => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
@@ -2212,6 +2246,7 @@
checkAddTransceiverWithSetRemoteOfferSending,
checkAddTransceiverWithSetRemoteOfferNoSend,
checkAddTransceiverBadKind,
checkNoMidOffer,
checkSetDirection,
checkCurrentDirection,
checkSendrecvWithNoSendTrack,