commit e9a47537a6444408621308f32301049ecbf337f4
parent 5135adaf64023656741bec81316a01abcfa0c488
Author: Philipp Hancke <philipp.hancke@googlemail.com>
Date: Wed, 3 Dec 2025 13:57:04 +0000
Bug 2003259 [wpt PR 56365] - webrtc: unmute tracks when a packet arrives after a receptiveness change, a=testonly
Automatic update from web-platform-tests
webrtc: unmute tracks when a packet arrives after a receptiveness change
still guarded behind the killswitch, now with more WPT to ensure
this does not regress unmute after renegotiation.
Bug: chromium:40821064
Change-Id: I9f45109f5c11be4ac1c792dedbc76b2cbd188d13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7157042
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#1552025}
--
wpt-commits: 39aae2c84b3405d70158cf809fe06e44fc415451
wpt-pr: 56365
Diffstat:
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html b/testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html
@@ -2232,7 +2232,42 @@ const tests = [
await exchangeOfferAnswer(pc1, pc2);
await waitUntilTrackEventWithTimeout(pc2.getReceivers()[0].track, 'mute', t);
assert_true(pc2.getReceivers()[0].track.muted, `track is muted`);
- }, `track with ${kind} gets muted when setting the transceiver direction in 'inactive'`);
+ }, `track with ${kind} gets muted when setting the transceiver direction to '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.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_false(pc2.getReceivers()[0].track.muted, `track is unmuted`);
+ }, `track with ${kind} gets unmuted when setting the transceiver direction to 'sendrecv ' after 'inactive'`);
});
</script>