From 5850c0b0243202d499586cace346988f1c6b5ad3 Mon Sep 17 00:00:00 2001 From: "phancke@microsoft.com" Date: Sat, 10 Jun 2023 10:37:58 +0000 Subject: [PATCH] Bug 1835859 [wpt PR 40306] - webrtc wpt: restore mid extension locally in simulcast tests, a=testonly Automatic update from web-platform-tests webrtc wpt: restore mid extension locally in simulcast tests which is mandatory to implement per https://datatracker.ietf.org/doc/html/rfc8853#section-5.5 BUG=chromium:1422258 Change-Id: Ic9118a4082748ba1ddce397810d31e282d5e005e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4573634 Commit-Queue: Philipp Hancke Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#1150858} -- wpt-commits: db1ac12ce7bb790ae98a1d03a22b54b55b2a93d2 wpt-pr: 40306 --- .../web-platform/tests/webrtc/simulcast/simulcast.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testing/web-platform/tests/webrtc/simulcast/simulcast.js b/testing/web-platform/tests/webrtc/simulcast/simulcast.js index 3aa0fc42870a9..9cfab17ffeb93 100644 --- a/testing/web-platform/tests/webrtc/simulcast/simulcast.js +++ b/testing/web-platform/tests/webrtc/simulcast/simulcast.js @@ -77,6 +77,16 @@ function midToRid(description, localDescription, rids) { } const localMid = localDescription ? SDPUtils.getMid(SDPUtils.splitSections(localDescription.sdp)[1]) : '0'; + if (localDescription) { + const localVideoSection = SDPUtils.splitSections(localDescription.sdp)[1]; + const localParameters = SDPUtils.parseRtpParameters(localVideoSection); + + const localMidExtension = localParameters.headerExtensions + .find(ext => ext.uri === 'urn:ietf:params:rtp-hdrext:sdes:mid'); + if (localMidExtension) { + rtpParameters.headerExtensions.push(localMidExtension); + } + } if (!rids) { rids = [];