From 227ba8d6fff5b5810aae212401c42f368740d661 Mon Sep 17 00:00:00 2001 From: shinya Date: Fri, 27 Jun 2025 12:30:35 +0800 Subject: [PATCH] fix: video not fit --- src/app/globals.css | 6 ++++++ src/app/play/page.tsx | 1 + 2 files changed, 7 insertions(+) diff --git a/src/app/globals.css b/src/app/globals.css index 9702e29..4fb5dc9 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -146,3 +146,9 @@ html.dark::view-transition-new(root) { html:not(.dark)::view-transition-new(root) { animation-name: slide-from-bottom; } + +/* 强制播放器内部的 video 元素高度为 100%,并保持内容完整显示 */ +div[data-media-provider] video { + height: 100%; + object-fit: contain; +} diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 599d620..b8f4fca 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -1453,6 +1453,7 @@ function PlayPageClient() { googleCastButton: null, pipButton: null, settingsMenu: null, + captionButton: null, muteButton: null, // 隐藏静音按钮 volumeSlider: null, // 隐藏音量条 airPlayButton: null, // 隐藏默认 AirPlay 按钮