Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .artifacts/1953/state-coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
"assertion": "passed",
"recorded_at": "2026-12-02T07:46:46Z",
"runner": "mason@MMBP"
},
{
"state": "05-thumb-tip-hidden",
"screenshot": "/Users/mason/ToHighs/clairis/.artifacts/1953/05-thumb-tip-hidden.png",
"assertion": "passed",
"recorded_at": "2026-12-02T08:34:11Z",
"runner": "mason@MMBP"
},
{
"state": "06-dark-thumb-tip-hidden",
"screenshot": "/Users/mason/ToHighs/clairis/.artifacts/1953/06-dark-thumb-tip-hidden.png",
"assertion": "passed",
"recorded_at": "2026-12-02T08:34:12Z",
"runner": "mason@MMBP"
}
]
}
8 changes: 8 additions & 0 deletions e2e/video-controls.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,14 @@ test("进度条悬停显示当前位置缩略图,移开消失", async ({ page
const gap = box.y - (tb.y + tb.height);
expect(gap).toBeGreaterThanOrEqual(0);
expect(gap).toBeLessThanOrEqual(12);
// 缩略图显示时,Artplayer 自带的时间气泡隐藏——同屏只留一个时间来源(#1953)
const tipDisplay = await page.evaluate(() => {
const tip = document.querySelector(
".art-video-player .art-progress-tip",
) as HTMLElement | null;
return tip ? getComputedStyle(tip).display : "absent";
});
expect(tipDisplay).toBe("none");
await page.mouse.move(box.x + box.width / 2, box.y - 80);
await expect(page.locator('[data-testid="video-thumb"]')).toHaveCount(0);
});
Expand Down
7 changes: 7 additions & 0 deletions src/components/Content/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ export default function VideoPlayer({
} | null>(null);
const thumbCanvasRef = useRef<HTMLCanvasElement | null>(null);
const thumbVideoRef = useRef<HTMLVideoElement | null>(null);
// 缩略图显隐同步到 $player 类:隐藏 Artplayer 自带的时间气泡,
// 避免与缩略图同屏两处时间(#1953 复测;音频无缩略图,气泡保留)。
useEffect(() => {
const player = artRef.current?.template?.$player;
if (!player) return;
player.classList.toggle("vp-thumb-show", thumb !== null);
}, [thumb]);
const [shotNotice, setShotNotice] = useState<{
text: string;
left: number;
Expand Down
6 changes: 6 additions & 0 deletions src/styles/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,9 @@
.art-video-player.art-video-player .hint--right:before {
border-right-color: var(--app-surface) !important;
}

/* 缩略图显示时隐藏 Artplayer 自带的时间气泡(.art-progress-tip):
与缩略图同屏两处时间重复;音频无缩略图不触此类,气泡保留(#1953 复测)。 */
.art-video-player.art-video-player.vp-thumb-show .art-progress-tip {
display: none;
}
Loading