tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 328a096339e350115644a4aef787c1dec3693864
parent f058a705aed4e359d6136c6fd6b07e8f565238ac
Author: Philipp Hancke <philipp.hancke@googlemail.com>
Date:   Thu, 11 Dec 2025 09:25:46 +0000

Bug 2004675 [wpt PR 56559] - webrtc: unmute tracks until a packet arrives after a receptiveness change, a=testonly

Automatic update from web-platform-tests
webrtc: unmute tracks until a packet arrives after a receptiveness change

This is gated by kMediaStreamTrackEmptyVideoFrameMonitor for more
deterministic behavior and kWebRtcUnmuteTracksWhenPacketArrives2
which is the new killswitch.

Bug: chromium:40821064
Change-Id: Ib0b87c8178d485565a9ead7883d673354617f858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7216294
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1555346}

--

wpt-commits: 2d7229cdbae7482d58ad59d2acff2678b4c30d56
wpt-pr: 56559

Diffstat:
Mtesting/web-platform/tests/webrtc/RTCRtpTransceiver.https.html | 38+++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html b/testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html @@ -2267,7 +2267,43 @@ const tests = [ await exchangeOfferAnswer(pc1, pc2); await waitUntilTrackEventWithTimeout(pc2.getReceivers()[0].track, 'unmute', t); assert_false(pc2.getReceivers()[0].track.muted, `track is unmuted`); - }, `track with ${kind} gets unmuted when setting the transceiver direction to 'sendrecv ' after 'inactive'`); + }, `track with ${kind} gets unmuted when setting the transceiver direction to 'sendrecv' after 'inactive'`); + + promise_test(async t => { + const pc1 = new RTCPeerConnection(); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + t.add_cleanup(() => pc2.close()); + + let stream; + if (kind === 'audio') { + stream = await navigator.mediaDevices.getUserMedia({[kind]: true}); + } else { + stream = await getNoiseStream({[kind]: true}); + } + t.add_cleanup(() => stream.getTracks().forEach(t => t.stop())); + + pc1.addTrack(stream.getTracks()[0], stream); + pc2.ontrack = t.step_func(async e => { + assert_true(e.track.muted, `track is muted in ontrack`); + }); + + await exchangeIceCandidates(pc1, pc2); + await exchangeOfferAnswer(pc1, pc2); + await waitUntilTrackEventWithTimeout(pc2.getReceivers()[0].track, 'unmute', t); + assert_false(pc2.getReceivers()[0].track.muted, `track is unmuted`); + pc1.getSenders()[0].replaceTrack(null); + + pc1.getTransceivers()[0].direction = 'inactive'; + await exchangeOfferAnswer(pc1, pc2); + await waitUntilTrackEventWithTimeout(pc2.getReceivers()[0].track, 'mute', t); + assert_true(pc2.getReceivers()[0].track.muted, `track is muted`); + + pc1.getTransceivers()[0].direction = 'sendrecv'; + await exchangeOfferAnswer(pc1, pc2); + await waitUntilTrackEventWithTimeout(pc2.getReceivers()[0].track, 'unmute', t); + assert_true(pc2.getReceivers()[0].track.muted, `track remains muted`); + }, `track with ${kind} stays muted when setting the transceiver direction to 'sendrecv' after 'inactive' but no packets flow`); }); </script>