From 4af77936760c06255540266455877d25c1bd6f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E4=B8=9C=E5=8B=8B=20=7C=20=E9=87=91=E6=9D=B1?= =?UTF-8?q?=E5=8B=B3=20=7C=20=EA=B9=80=EB=8F=99=ED=9B=88=20=7C=20Jin=20Don?= =?UTF-8?q?gxun?= Date: Tue, 10 Nov 2026 16:31:06 +0800 Subject: [PATCH] Validate the base audio encoder configuration first --- index.src.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.src.html b/index.src.html index f6959c40..d96a7481 100644 --- a/index.src.html +++ b/index.src.html @@ -2175,11 +2175,11 @@ 1. If {{AudioEncoderConfig/codec}} is empty after [=strip leading and trailing ASCII whitespace|stripping leading and trailing ASCII whitespace=], return `false`. -2. If the {{AudioEncoderConfig}} has a codec-specific extension and the corresponding +2. If {{AudioEncoderConfig/sampleRate}} or {{AudioEncoderConfig/numberOfChannels}} are + equal to zero, return `false`. +3. If the {{AudioEncoderConfig}} has a codec-specific extension and the corresponding registration in the [[WEBCODECS-CODEC-REGISTRY]] defines steps to check whether the extension is a valid extension, return the result of running those steps. -3. If {{AudioEncoderConfig/sampleRate}} or {{AudioEncoderConfig/numberOfChannels}} are - equal to zero, return `false`. 4. Return `true`.