Commit b6b88fdd authored by Philipp Hancke's avatar Philipp Hancke Committed by Commit Bot

webrtc insertable streams: disable RTX in tests

in order to avoid RTX probes showing up on the receiving end

BUG=chromium:1066819

Change-Id: Icfeead1bc08557f6cb2fc3080c20b7f4bd92be29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144080Reviewed-by: default avatarHarald Alvestrand <hta@chromium.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#760472}
parent 54f3599a
...@@ -29,8 +29,25 @@ function areFrameInfosEqual(frame1, frame2) { ...@@ -29,8 +29,25 @@ function areFrameInfosEqual(frame1, frame2) {
areArrayBuffersEqual(frame1.data, frame2.data); areArrayBuffersEqual(frame1.data, frame2.data);
} }
async function doSignalingHandshake(pc1, pc2) {
const offer = await pc2.createOffer({offerToReceiveAudio: true, offerToReceiveVideo: true});
// TODO(crbug.com/1066819): remove this hack when we do not receive duplicates from RTX
// anymore.
// Munge the SDP to disable bandwidth probing via RTX.
const sdp = offer.sdp.replace(new RegExp('rtx', 'g'), 'invalid');
await pc1.setRemoteDescription({type: 'offer', sdp});
await pc2.setLocalDescription(offer);
const answer = await pc1.createAnswer();
await pc2.setRemoteDescription(answer);
await pc1.setLocalDescription(answer);
}
async function doInverseSignalingHandshake(pc1, pc2) { async function doInverseSignalingHandshake(pc1, pc2) {
const offer = await pc2.createOffer({offerToReceiveAudio: true, offerToReceiveVideo: true}); const offer = await pc2.createOffer({offerToReceiveAudio: true, offerToReceiveVideo: true});
// Munge the SDP to disable bandwidth probing via RTX.
const sdp = offer.sdp.replace(new RegExp('rtx', 'g'), 'invalid');
await pc1.setRemoteDescription({type: 'offer', sdp});
await pc1.setRemoteDescription(offer); await pc1.setRemoteDescription(offer);
await pc2.setLocalDescription(offer); await pc2.setLocalDescription(offer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment