tor-browser

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

commit 5a8abaf9c7b582f3f20b5ff6e287eaf688f697c0
parent 9b586cbcf62345f842f1c6c843f60e63dbf8cc35
Author: Syed AbuTalib <lowkey@google.com>
Date:   Fri, 19 Dec 2025 09:18:42 +0000

Bug 2006201 [wpt PR 56759] - Support Matroska MIME types in MediaRecorder, a=testonly

Automatic update from web-platform-tests
Support Matroska MIME types in MediaRecorder

Add explicit support for `video/matroska`, `audio/matroska`, and
`audio/x-matroska` MIME types to `MediaRecorderHandler`.

Previously, `video/x-matroska` was partially supported but was
internally aliased to `video/mp4` for codec verification. This change
removes that alias, allowing Matroska types to be processed natively.

The validation logic in `CanSupportVideoType` and `CanSupportAudioType`
is updated to accept these new MIME strings. Additionally,
`ActualMimeType` is updated to report the correct MIME type instead of
defaulting to WebM or MP4 when these types are used. `TrackRecorder` is
also updated to map these strings to the `kVideoMatroska` container
type.

Bug: 40921769
Change-Id: I911784d885d5f65670f080a22001996ac34e2228
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7262837
Commit-Queue: Syed AbuTalib <lowkey@google.com>
Reviewed-by: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/main@{#1560145}

--

wpt-commits: d094f5cc5441a0c644c492fb93430fc2f70bc7d4
wpt-pr: 56759

Diffstat:
Mtesting/web-platform/tests/mediacapture-record/MediaRecorder-mimetype.html | 27++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/testing/web-platform/tests/mediacapture-record/MediaRecorder-mimetype.html b/testing/web-platform/tests/mediacapture-record/MediaRecorder-mimetype.html @@ -13,6 +13,8 @@ const AUDIO_ONLY_MIME_TYPES = [ 'audio/mp4', 'audio/ogg', 'audio/webm', + 'audio/matroska', + 'audio/x-matroska', ]; const AUDIO_CODECS_MIME_TYPES = [ @@ -22,12 +24,17 @@ const AUDIO_CODECS_MIME_TYPES = [ 'audio/webm; codecs="opus"', 'audio/mp4; codecs="mp4a.40.2"', 'audio/mp4; codecs="opus"', + 'audio/matroska; codecs="opus"', + 'audio/matroska; codecs="pcm"', + 'audio/x-matroska; codecs="opus"', + 'audio/x-matroska; codecs="pcm"', ]; const VIDEO_ONLY_MIME_TYPES = [ 'video/mp4', 'video/webm', - 'video/x-matroska' + 'video/x-matroska', + 'video/matroska' ]; const VIDEO_CODECS_MIME_TYPES = [ @@ -41,6 +48,16 @@ const VIDEO_CODECS_MIME_TYPES = [ 'video/mp4; codecs="hev1.1.6.L186.B0"', 'video/x-matroska; codecs="hvc1.1.6.L186.B0"', 'video/x-matroska; codecs="hev1.1.6.L186.B0"', + 'video/matroska; codecs="vp8"', + 'video/matroska; codecs="vp9"', + 'video/matroska; codecs="av1"', + 'video/matroska; codecs="hvc1.1.6.L186.B0"', + 'video/matroska; codecs="hev1.1.6.L186.B0"', + 'video/matroska; codecs="avc1.64003E"', + 'video/x-matroska; codecs="vp8"', + 'video/x-matroska; codecs="vp9"', + 'video/x-matroska; codecs="av1"', + 'video/x-matroska; codecs="avc1.64003E"', ]; const AUDIO_VIDEO_MIME_TYPES = [ @@ -58,6 +75,14 @@ const AUDIO_VIDEO_MIME_TYPES = [ 'video/mp4; codecs="hev1.1.6.L186.B0, opus"', 'video/x-matroska; codecs="hvc1.1.6.L186.B0, opus"', 'video/x-matroska; codecs="hev1.1.6.L186.B0, opus"', + 'video/matroska; codecs="vp9, opus"', + 'video/matroska; codecs="av1, opus"', + 'video/matroska; codecs="hvc1.1.6.L186.B0, opus"', + 'video/matroska; codecs="hev1.1.6.L186.B0, opus"', + 'video/matroska; codecs="avc1.64003E, opus"', + 'video/x-matroska; codecs="vp9, opus"', + 'video/x-matroska; codecs="av1, opus"', + 'video/x-matroska; codecs="avc1.64003E, opus"', ]; const AUDIO_MIME_TYPES = [