From a7d7a607543bccc3508e62fbd262bb9b6b30b8de Mon Sep 17 00:00:00 2001
From: zhengqiuyang <54101044+zhengqiuyang@users.noreply.github.com>
Date: Thu, 19 Nov 2026 16:03:33 +0000
Subject: [PATCH] fix(lint): read a media window's start through the parser
(#8133)
`mediaTimeWindow` parsed `data-start` with a raw `Number()`. A negative start,
which `readClipTiming` clamps to zero, produced a window entirely before zero,
so `mediaWindowsOverlap` reported no overlap and `video_audio_double_source`
missed a real duplicate-audio error.
Read the window through `readClipTiming`, the same contract parser the renderer
uses, and keep returning null when the start or duration is unknown.
---
packages/lint/src/rules/media.test.ts | 14 ++++++++++++++
packages/lint/src/utils.ts | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/packages/lint/src/rules/media.test.ts b/packages/lint/src/rules/media.test.ts
index f36516a18d..039e43085d 100644
--- a/packages/lint/src/rules/media.test.ts
+++ b/packages/lint/src/rules/media.test.ts
@@ -496,6 +496,20 @@ describe("media rules", () => {
);
});
+ it("video_audio_double_source still fires when the video starts negative", async () => {
+ const html = `
+