Peach: Local-first video metadata scraper and media manager.
fix(player): match hover progress and fullscreen behavior
longmeidao772c5e865c53
diff --git a/docs/HANDOFF.md b/docs/HANDOFF.mdindex 32aeccecc..566832c98 100644--- a/docs/HANDOFF.md+++ b/docs/HANDOFF.md@@ -78,7 +78,7 @@ Claude 的 `.claude/settings.json` 已配置 Stop、StopFailure、SessionEnd hoo**Vercel Geist Table/Home(2026-08-30)**:同形可比较数据使用语义 `table`,数字列保持 tabular numerals;Peach 因此把系统盘、资源盘、115 与 PikPak 容量放进同一张使用空间表。内容标签是固定 Top 排行和直接筛选,不伪装成可排序数据表,桌面使用保持 DOM 排名顺序的双栏有序列表,手机回到单栏。Vercel Table 的交互 DOM 与计算样式本轮未取得,Home 只确认共享对齐和清晰分区;失败通道、已取得原则与有意差异见 `vercel-geist-table-ranking.md`。默认 Note、只读提示和 info 入口统一复用图片详情已有的本地 Lucide 圆圈 `i`,并显式使用 2px 描边与圆端点保证 `i` 的圆点可见,不复制未开放许可的 Geist 私有 SVG。**Vercel Command Menu/Search Input/Spinner/Loading Dots(2026-08-30)**:设置覆盖层使用锁定 Dialog CSS 的 350ms、`cubic-bezier(.4,0,.2,1)` 与 -40px 淡入轨迹,普通菜单仍无动画;Search Input 的搜索图标在查询期间原位换成 Spinner。用户直接触发的检查、加载、保存与应用使用 Spinner,后台抓取和扫描进度使用 Loading Dots;“没有更多历史内容”是中性、可关闭的 Note,不得登记为红色故障。证据哈希、未取得面与 Peach 差异见 `vercel-geist-command-search-loading.md`。**Vercel Notifications 中性说明 Note(2026-08-30)**:登录态截图确认底部补充说明使用带圆圈信息图标的整行中性表面,存在真实动作时链接紧跟正文;Peach 的口味归因和隐私说明复用 secondary `noteHtml`,没有真实动作时不伪造链接。实时 DOM/CSS 读取在 30 秒后超时,已取得边界、截图哈希和有意差异见 `vercel-notifications-note.md`。**Beeg 资料页(2026-08-30)**:Reislin 与 SweetieFox 页面证据锁定的顺序是头像与名称、简介、外部链接、关联艺人轨道、标签轨道、内容;轨道不另加可见标题。Peach 的女优/厂牌资料页和关注页复用这个阅读顺序;资料页有照片时只显示一个 32×32px `PicsIcon`,放在标签左侧,选中代表照片视图,再点一次回到视频,不保留独立的「视频/照片」文字标签栏。合集详情继续使用普通详情的左媒体、右信息,下方另设 Mix/分卷/播放列表/多视频的横向切换带。锁定样式摘要、哈希、未取得面和主动差异见 `beeg-profile-layout.md`。-YouTube Shorts 沉浸页使用用户截图记录 `docs/reference-snapshots/youtube-shorts-immersive-user-screenshot.md`:竖屏复用中央 9:16 舞台和外置动作列,横屏使用在整个视口视觉居中的 16:9 舞台并把动作列收进视频右侧;Peach 保留自己的反馈语义,不复制订阅或社交动作。沉浸视频每次加载都要带独立 `session`,切片、关闭、失败和页面离开时取消旧会话;只清浏览器的 `src` 不足以停止 CloudDrive 预读或 FFmpeg。普通播放器控制栏另使用用户截图、实际 YouTube `e937390a` 播放器 DOM/CSS/JS 和官方帮助记录 `docs/reference-snapshots/youtube-player-controls-user-screenshot.md`:控制栏为透明 59 px 两排结构;左侧播放是 40 px 圆钮,音量从 40 px 展开到 111 px,提示层允许越过胶囊,时间使用 40 px 高、28 px 圆角胶囊并可切换已播/剩余时间;右侧画中画/设置/影院/全屏不是四个描边圆钮,而是 48×40 px 单钮共用一个 40 px 高、28 px 圆角深色胶囊。已播段、12 px 圆点和卡片观看进度统一使用 Peach 蓝。中央只保留一个 68 px 深色圆形播放/暂停键;键盘仍按设置前后跳转,控制栏和中央层都不画 10 秒按钮。本地时刻预览复用九宫格接触表,在线视频只显示时刻。设置浮层按实测 274 px 宽、12 px 圆角、48 px 行高、56 px 图标列和 57 px 子菜单标题栏,只列真实能力:氛围模式全局开关、播放速度和实际清晰度;影院模式用按钮或 `T` 切换为大播放器,展开/收回使用不同图标和「影院模式/默认视图」提示,详情移到下方。音量、画中画和全屏改用统一 24 px 本地图标;Peach 不复制没有实际能力的字幕、睡眠定时或自动播放按钮。+YouTube Shorts 沉浸页使用用户截图记录 `docs/reference-snapshots/youtube-shorts-immersive-user-screenshot.md`:竖屏复用中央 9:16 舞台和外置动作列,横屏使用在整个视口视觉居中的 16:9 舞台并把动作列收进视频右侧;Peach 保留自己的反馈语义,不复制订阅或社交动作。沉浸视频每次加载都要带独立 `session`,切片、关闭、失败和页面离开时取消旧会话;只清浏览器的 `src` 不足以停止 CloudDrive 预读或 FFmpeg。普通播放器控制栏另使用用户截图、实际 YouTube `e937390a` 播放器 DOM/CSS/JS 和官方帮助记录 `docs/reference-snapshots/youtube-player-controls-user-screenshot.md`:控制栏为透明 59 px 两排结构;左侧播放是 40 px 圆钮,音量从 40 px 展开到 111 px且静音键固定在首个 40 px 内,音量与时间都用内缩 4 px 的白色 10% 悬停层,时间可切换已播/剩余。右侧画中画/设置/影院/全屏是 48×40 px 单钮共用一个 40 px 高、28 px 圆角深色胶囊。进度轨道按 200 ms 从约 4 px 放大到 6 px,12 px 圆点从隐藏放大到约 20 px;已播段、圆点和卡片观看进度统一使用 Peach 蓝。中央只保留一个 78 px 深色圆形播放/暂停键并带 1 秒放大淡出反馈;键盘仍按设置前后跳转,控制栏和中央层都不画 10 秒按钮。本地时刻预览复用九宫格接触表,在线视频只显示时刻。设置浮层按实测 274 px 宽、12 px 圆角、48 px 行高、56 px 图标列和 57 px 子菜单标题栏,只列真实能力;整行悬停覆盖图标、文字、值和箭头,40×24 px 开关的 20 px 圆点保留 2 px 边距。影院模式用按钮或 `T` 切换为大播放器,展开/收回使用不同图标和「影院模式/默认视图」提示;全屏播放器固定到四个视口边缘并使用 `100vw × 100vh`。音量、播放/暂停、画中画、设置项和全屏使用统一 24 px 本地图标;Peach 不复制没有实际能力的字幕、睡眠定时或自动播放按钮。F95 masked 链接与 Gofile 文件列表的凭据边界见 `f95-masked-gofile-media`;Mix 只按已解析且可播放的视频计数,不按回复数或网盘页数计数。FANBOX 多图、Gofile Bearer API、Paheal 标签页与跨站出处键见diff --git a/docs/REUSE.md b/docs/REUSE.mdindex 4288dfd34..7aeea4a2b 100644--- a/docs/REUSE.md+++ b/docs/REUSE.md@@ -42,7 +42,7 @@| FC2 跨号证据 | 已缓存的 fc2cmadb 评论收获 + Peach ledger 媒体事实 | 稳定 pair、合集/分片保护、hash/时长/尺寸佐证、库外 evidence、健康统计和人工复核;不依赖 FC2-Leak-Detector/JavSP || 媒体探测/转码 | Peach 管理的 FFmpeg/ffprobe | 任务策略和 Media Engine 编排 || HTML5/HLS/DASH 播放 | Video.js 8.24.0 + 内置 VHS(Apache-2.0,本地固定版本) | 流方案、授权、稳定时长、回退顺序和统计面板 |-| 播放器设置与影院布局 | Video.js 8.24.0 的 `playbackRate`、既有 QualityLevel 与原生控制栏插槽;YouTube `e937390a` 实际 DOM/CSS/JS 只作可测量行为证据 | Peach 组合氛围模式、播放速度、真实清晰度和影院模式,并在现有 DOM 上复用 59 px 两排控制栏、横向音量、右侧共享胶囊与 274 px 设置菜单;不复制代码、不迁移到 Video.js 10 Menu,也不引入重复现有质量选择的插件 |+| 播放器设置与影院布局 | Video.js 8.24.0 的 `playbackRate`、既有 QualityLevel 与原生控制栏插槽;YouTube `e937390a` 实际 DOM/CSS/JS 只作可测量行为证据 | Peach 在现有 DOM 上组合氛围模式、播放速度、真实清晰度和影院模式,并复用 59 px 两排控制栏、40→111 px 横向音量、4→6 px 进度动画、右侧共享胶囊、整行悬停的 274 px 设置菜单和视口级全屏;图形重画为本地 SVG,不复制代码、不迁移到 Video.js 10 Menu,也不引入重复现有质量选择的插件 || 播放器时刻预览 | Video.js 原生进度控件 + Peach 既有 `/poster?id=&c=0…8` 九宫格切片 | 本地媒体用已有接触表提供近似时刻缩略图;在线视频只显示时刻。`videojs-vtt-thumbnails` 与 `videojs-sprite-thumbnails` 都要求另建 sprite/VTT 契约,本项目不为已有能力新增依赖或重复抽帧 || 分卷文件命名 | [Plex 官方命名](https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/)的 `cd/disc/disk/dvd/part/pt + 数字` 与 [Kodi 官方 File Stacking](https://kodi.wiki/view/File_stacking)只作行为证据;运行时复用当前树的 `part_marker`,不新增扫描器依赖 | 兼容馆藏已有的裸数字和 A–H 后缀;仅连续、唯一标记自动合卡,保留每个 asset 和播放会话,不拼接或改写媒体 || 照片灯箱轮播 | Swiper 14.2.0(MIT,本地固定版本,按需 `<script>` 注入)的 Thumbs / Keyboard / Zoom 模块 | 图集来源与顺序、缩略图缓存与计费口径、瀑布流本身(CSS `column-count`,不经过 Swiper) |diff --git a/docs/reference-snapshots/youtube-player-controls-user-screenshot.md b/docs/reference-snapshots/youtube-player-controls-user-screenshot.mdindex 3d4714169..c863acbc7 100644--- a/docs/reference-snapshots/youtube-player-controls-user-screenshot.md+++ b/docs/reference-snapshots/youtube-player-controls-user-screenshot.md@@ -55,6 +55,11 @@`24c91a1804bca776e3244ebd0be6d582cd8bcd425d0a6681005efe6dcd06ebd2`、`732f1d356299e9c2ec0523d55399cb2154eb50c259b87eac2c11c31b5cf6cf44`、`bfaeaef7e620367c4421a00528d83c27fbd052ae7a95bd5ae65cffe1ef421950`+- 第十轮用户标注的音量重叠、设置对齐、实际 YouTube 设置面板和全屏未铺满偏差图共 4 张,SHA-256+ `c72284752f1bb819da90530b180e5119d619fd22e1220eb887b6d645a86860b3`、+ `06c71239b969d3e15cb2fd36ca453dfc52d4f4518869b5459eb4b2018a03fcab`、+ `41c8b2dda5d79044361960f249fa4dd702784da690cc1ca113e299464502c49e`、+ `d2fe79b33c72950951310a7224262c9b0d4a5ede5779cfe890cdc2ffcdba8914`- YouTube 官方氛围模式说明:<https://support.google.com/youtube/answer/12827017?hl=en-GB>,2026-08-30 复核;说明颜色取自视频并扩散到屏幕背景,深色主题默认开启,设置开关对所有视频生效。- YouTube 官方播放器大小说明:<https://support.google.com/youtube/answer/6052392?hl=en>,@@ -74,7 +79,7 @@| 时间 | 外层 56 px;内层 40 px 高、左右 16 px、圆角 28 px、背景 `rgba(0,0,0,.3)`;点击从 `0:01 / 0:19` 切为 `-0:18 / 0:19` | 独立可点击胶囊;按用户亮色视频截图提高为黑色 60% || 右侧控制组 | 高 40 px、左右 padding 4 px、圆角 28 px、背景 `rgba(0,0,0,.3)`、模糊 16 px | 画中画/设置/影院/全屏放进同一共享容器;按用户亮色视频截图提高为黑色 60% || 右侧单钮 | 48×40 px、透明;悬停伪元素 48×32 px、圆角 40 px、白色 10% | 同值;按下白色 20%,SVG 仅保留 1 px drop-shadow |-| 进度 | 命中区 6 px,轨道 3–4 px,圆点 12 px | 几何同值,已播段和圆点改为 Peach 蓝 |+| 进度 | 命中区 6 px;6 px 轨道静止缩放为约 4 px,悬停恢复 6 px;12 px 圆点从 0 放大到约 20 px;过渡 200 ms | 几何和过渡同值,已播段和圆点改为 Peach 蓝 || 设置浮层 | 宽 274 px、圆角 12 px、背景黑 60%、模糊 16 px、无边框/阴影 | 只保留 Peach 已实现的三项能力 || 设置行 | 约 48 px;图标 24 px;图标列 56 px;正文 14/18.2 px;悬停白色 10% | 同值,不再使用旧 58 px 行高和大字号 || 设置开关 | 40×24 px、圆角 12 px;圆点 20 px、边距 2 px、开启位移 16 px | 同值,状态仍由 Peach 全局设置持久化 |@@ -102,6 +107,24 @@- 实际底栏音量图标使用 24×24 实心轮廓,全屏按钮 48×40 px 且展开/退出使用反向图形;Peach用同尺寸本地 SVG 取代 Video.js 字体图标,避免与设置、影院图标产生光学大小漂移。+### 第十轮 DevTools/官方 CSS 纠偏++- `.ytp-volume-area` 与 `.ytp-time-wrapper` 都使用 `inset:4px` 的内部伪元素;悬停为白色 10%,+ 按下为白色 20%,过渡 200 ms。音量从 40 px 展开时,40 px 静音按钮仍固定在容器内,不能沿用+ Video.js 的偏移量。+- `.ytp-progress-list` 本体高 6 px,静止 `scaleY(.667)`、悬停恢复 1;12 px scrubber 静止缩为 0,+ 悬停放大到 1.67。两者使用 200 ms `cubic-bezier(.05,0,0,1)`。+- 设置菜单内边距 8 px、行高 48 px;每一整行(包括末端值和展开箭头)统一覆盖白色 10% 悬停层。+ 开关为 40×24 px,圆点 20 px、四周 2 px;关闭态轨道黑色 30%、圆点白色 70%,开启态轨道+ 白色 30%、圆点纯白并平移 16 px。+- 现代中央反馈层为 78×78 px、黑色 60%、16 px 模糊;播放/暂停触发 1 秒反馈动画:0% 透明,+ 25%–75% 不透明且放大到 1.33,100% 恢复尺寸并淡出。+- 全屏不是继承父容器的 `100%`;播放器要固定到视口四边并使用 `100vw × 100vh`,视频 tech 同样+ 覆盖视口后以 `contain` 保留完整画面。+- 用户随后明确要求切到 Chrome DevTools;本机 Chrome 已安装,但 Chrome 配置目录、浏览器扩展和+ Native Host 均未取得,因此 Chrome/CDP 验收标为「未取得」。本轮精确值来自已锁定同版本官方+ `www-player.css` 和此前实际 YouTube 页面 DOM/计算样式,不把 Chrome 验收写成成功。+## 可复用证据| 项 | 截图证据 | Peach 实现 |@@ -113,8 +136,8 @@| 进度状态 | 细轨道、品牌色已播段和圆点;卡片缩略图底边显示已观看段 | Peach 把红色替换为 `--tungsten` 蓝,卡片按 `play_seconds / duration` 绘制同色进度 || 拖动提示 | 指针时刻上方显示时间;精确拖动时可带缩略图 | 本地媒体复用九宫格接触表近似对应时刻,在线媒体只显示时间,不伪造逐帧预览 || 清晰度 | 齿轮图标带 `HD` 状态标记,实际选项在菜单内 | 齿轮显示 `HD`/`4K`,菜单继续只列媒体真实分辨率 |-| 中央播放 | 半透明黑色圆形底、居中的白色三角 | 覆盖 Video.js 默认矩形按钮,使用圆形底与 CSS 白色三角 |-| 中央反馈 | 用户补充中央不只播放,还要暂停;第八轮明确删除左右快退/快进 | 单个 68 px 深色圆钮按播放状态切换三角与双竖线;键盘跳转保留 |+| 中央播放 | 半透明黑色圆形底、居中的白色三角 | 覆盖 Video.js 默认矩形按钮,使用 78 px 圆形底与 CSS 白色三角 |+| 中央反馈 | 用户补充中央不只播放,还要暂停;第八轮明确删除左右快退/快进 | 单个深色圆钮按播放状态切换三角与双竖线并播放 1 秒反馈动画;键盘跳转保留 || 左上工具 | 用户要求与播放器按钮统一 | 播放统计键使用相同的 40 px 无描边圆钮、底色和悬停反馈 || 左上状态 | Peach 对照图中统计圆钮约 80px 高,加载速度约 75px 高 | CSS 固定两者为相同 40px 逻辑高度、相同 `top:11px` 和 `box-sizing:border-box` || 设置面板 | 圆角半透明浮层,主层展示氛围模式、播放速度、清晰度;子层选择实际值 | Peach 复用现有清晰度等级和 Video.js `playbackRate`,加入同层氛围开关与返回式子菜单;不画没有实现的睡眠定时 |diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex d1088e295..9d17117ec 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -592,8 +592,10 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains("border-radius:0;background:transparent;backdrop-filter:none")self.assertPageContains(".vwrap .video-js .vjs-control-bar>.vjs-play-control{position:relative;align-self:flex-end;flex:0 0 40px;width:40px;height:40px")self.assertPageContains("border:0;border-radius:50%;background:rgba(0,0,0,.6);box-shadow:none;overflow:hidden")- self.assertPageContains(".video-js.vjs-paused .vjs-control-bar>.vjs-play-control .vjs-icon-placeholder:before")- self.assertPageContains(".video-js.vjs-playing .vjs-control-bar>.vjs-play-control .vjs-icon-placeholder:after")+ self.assertPageContains("const playUse=explicitIcon(play,'player-play')")+ self.assertPageContains("const syncPlayIcon=()=>playUse?.setAttribute('href'")+ self.assertPageContains("id=\"i-player-play\"")+ self.assertPageContains("id=\"i-player-pause\"")self.assertPageContains(".vjs-peach-right-controls{box-sizing:border-box;position:relative;align-self:flex-end")self.assertPageContains("padding:0 4px;display:flex;align-items:center;border:0;border-radius:28px;background:rgba(0,0,0,.6);box-shadow:none")self.assertPageContains("overflow:visible;transition:width .2s")@@ -608,14 +610,18 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains(".vwrap .video-js .vjs-progress-control{position:absolute;left:0;right:0;top:0;width:auto;height:6px")self.assertPageContains(".vwrap .video-js .vjs-play-progress{background:var(--tungsten)}")self.assertPageContains(".vwrap .video-js .vjs-play-progress:before{content:\"\"")- self.assertPageContains("width:12px;height:12px")+ self.assertPageContains("width:100%;height:6px;margin:0;border-radius:0")+ self.assertPageContains("transform:scaleY(.667);transition:transform .2s cubic-bezier(.05,0,0,1)")+ self.assertPageContains("transform:translateY(-50%) scale(1.67)")self.assertPageContains(".vwrap .video-js .vjs-custom-control-spacer{display:block;flex:1 1 auto}")self.assertPageContains(".vwrap .video-js .vjs-time-control{display:none!important}")self.assertPageContains(".vwrap .video-js .vjs-peach-time{box-sizing:border-box;align-self:flex-end")self.assertPageContains("padding:0 16px;border:0;border-radius:28px;background:rgba(0,0,0,.6)")self.assertPageContains("time.type='button';time.className='vjs-peach-time vjs-control';time.dataset.playerTime=''")self.assertPageContains("remaining=!remaining;syncTime()")- self.assertPageContains("time.textContent=`${shown} / ${fmtClock(duration)}`")+ self.assertPageContains("time.innerHTML='<span class=\"vjs-peach-time-text\"></span>'")+ self.assertPageContains("timeText.textContent=`${shown} / ${fmtClock(duration)}`")+ self.assertPageContains(".vjs-peach-time:hover:after")self.assertPageContains(".vwrap .video-js.vjs-layout-x-small .vjs-progress-control")self.assertPageContains(".vwrap .video-js.vjs-layout-small .vjs-current-time")self.assertPageContains("currentTimeDisplay:true,timeDivider:true")@@ -626,12 +632,15 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains("activePixels>=2160?'4K':activePixels>=720?'HD':''")self.assertPageContains("levels[index].enabled=selected==='auto'||selected===String(index)")self.assertPageContains("const syncVolumeIcon=()=>muteUse?.setAttribute('href'")+ self.assertPageContains("volume.insertAdjacentHTML('afterbegin','<span class=\"vjs-peach-hover\"")+ self.assertPageContains("position:relative!important;left:0!important;top:0!important;flex:0 0 40px")self.assertPageContains("const syncFullscreenIcon=()=>fullscreenUse?.setAttribute('href'")self.assertPageContains("id=\"i-player-volume\"")self.assertPageContains("id=\"i-player-volume-muted\"")self.assertPageContains("id=\"i-player-fullscreen-enter\"")self.assertPageContains("id=\"i-player-fullscreen-exit\"")self.assertPageContains(".vjs-peach-control-icon{position:absolute;z-index:2;left:50%;top:50%;width:24px;height:24px")+ self.assertPageContains("[data-peach-explicit-icon]:active>.vjs-peach-control-icon")self.assertPageContains("function mountDetailPlayer(it,video,autoplay,options={})")self.assertPageContains("detailPlayer.duration(expected)")self.assertPageContains("['loadstart','loadedmetadata','durationchange','error']")@@ -652,9 +661,12 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageLacks('data-center-seek=')self.assertPageContains("toggle.setAttribute('aria-label',playing?'暂停':'播放')")self.assertPageContains("if(player.paused()||player.ended())player.play().catch(()=>{});else player.pause()")- self.assertPageContains(".vjs-peach-center-controls button{position:relative;width:68px;height:68px")+ self.assertPageContains("root.classList.add('is-feedback')")+ self.assertPageContains("animation:peach-player-bezel-fadeout 1s linear both")+ self.assertPageContains("25%,75%{opacity:1;transform:scale(1.33)}")+ self.assertPageContains(".vjs-peach-center-controls button{position:relative;width:78px;height:78px")self.assertPageContains("border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.6)")- self.assertPageContains(".vjs-peach-center-controls .vjs-peach-center-toggle{width:68px;height:68px}")+ self.assertPageContains(".vjs-peach-center-controls .vjs-peach-center-toggle{width:78px;height:78px}")self.assertPageContains('.vjs-peach-center-controls[data-state="pause"] .vjs-peach-center-pause{display:flex}')self.assertPageContains("mountPlayerCenterControls(detailPlayer)")@@ -678,6 +690,12 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains("<span>清晰度</span>")self.assertPageContains("player.playbackRate(Number(button.dataset.playerSpeedOption))")self.assertPageContains("applyAmbientMode(!appSettings.ambientMode)")+ self.assertPageContains("${icon('player-ambient')}")+ self.assertPageContains("${icon('player-speed')}")+ self.assertPageContains("${icon('player-quality')}")+ self.assertPageContains('id="i-player-ambient"')+ self.assertPageContains('id="i-player-speed"')+ self.assertPageContains('id="i-player-quality"')self.assertPageContains(".vjs-peach-settings-menu{box-sizing:border-box;position:absolute;z-index:5;right:-100px;bottom:52px;width:min(274px")self.assertPageContains("padding:8px;border:0;border-radius:12px;background:rgba(0,0,0,.6);box-shadow:none")self.assertPageContains("min-height:48px;padding:0;border:0;border-radius:8px")@@ -688,7 +706,10 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains("class=\"vjs-peach-panel-header\"")self.assertPageContains('aria-label="返回上一个菜单"')self.assertPageContains("color:#eee")- self.assertPageContains(".vjs-peach-switch{position:relative;width:40px;height:24px;border-radius:12px")+ self.assertPageContains(".vjs-peach-switch{box-sizing:border-box;display:block;position:relative;width:40px;height:24px;border-radius:12px")+ self.assertPageContains("background:rgba(0,0,0,.3)")+ self.assertPageContains("background:rgba(255,255,255,.7)")+ self.assertPageContains(".vjs-peach-settings-menu button:before{content:\"\";position:absolute;z-index:0;inset:0")self.assertPageLacks("睡眠定时")def test_player_volume_background_survives_theater_and_fullscreen(self):@@ -720,6 +741,8 @@ class WebUiSourceTests(unittest.TestCase):def test_fullscreen_uses_the_entire_player_and_reports_loading_speed(self):self.assertPageContains(".vwrap>.video-js.vjs-fullscreen")+ self.assertPageContains("position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;padding:0!important")+ self.assertPageContains("position:absolute!important;inset:0!important;width:100vw!important;height:100vh!important")self.assertPageContains("max-height:none!important")self.assertPageContains('id="playerNet"')self.assertPageContains("function streamSpeedBits(id,session='')")diff --git a/web/app.css b/web/app.cssindex 220b9bcde..ff4a44ee7 100644--- a/web/app.css+++ b/web/app.css@@ -1008,15 +1008,18 @@ body.index-open #tiers,body.index-open #tagbar{display:none}display:flex;align-items:center;transition:opacity .2s cubic-bezier(.05,0,0,1);pointer-events:auto}.video-js.vjs-playing:not(.vjs-user-active) .vjs-peach-center-controls{opacity:0;pointer-events:none}.video-js.vjs-error .vjs-peach-center-controls{display:none}-.vjs-peach-center-controls button{position:relative;width:68px;height:68px;padding:0;border:0;- border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.6);color:#fff;box-shadow:none;cursor:pointer}+.vjs-peach-center-controls button{position:relative;width:78px;height:78px;padding:0;border:0;+ border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.6);color:#fff;box-shadow:none;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);cursor:pointer}.vjs-peach-center-controls button:hover,.vjs-peach-center-controls button:focus-visible{background:rgba(0,0,0,.72)}.vjs-peach-center-controls button:active{background:rgba(0,0,0,.82)}-.vjs-peach-center-controls .vjs-peach-center-toggle{width:68px;height:68px}+.vjs-peach-center-controls .vjs-peach-center-toggle{width:78px;height:78px}.vjs-peach-center-play{width:0;height:0;border-top:15px solid transparent;border-bottom:15px solid transparent;border-left:23px solid #fff;transform:translateX(3px);filter:drop-shadow(0 0 1px rgba(0,0,0,.8))}.vjs-peach-center-pause{display:none;gap:7px}.vjs-peach-center-pause i{display:block;width:7px;height:28px;border-radius:1px;background:#fff;filter:drop-shadow(0 0 1px rgba(0,0,0,.8))}.vjs-peach-center-controls[data-state="pause"] .vjs-peach-center-play{display:none}.vjs-peach-center-controls[data-state="pause"] .vjs-peach-center-pause{display:flex}+.vjs-peach-center-controls.is-feedback button{animation:peach-player-bezel-fadeout 1s linear both}+@keyframes peach-player-bezel-fadeout{0%{opacity:0;transform:scale(1)}25%,75%{opacity:1;transform:scale(1.33)}100%{opacity:0;transform:scale(1)}}+@media (prefers-reduced-motion:reduce){.vjs-peach-center-controls.is-feedback button{animation:none}}/* YouTube `e937390a` 实测控制层:59px 控制栏、40px 左钮、右侧共享胶囊和 6px 进度命中区。 */.vwrap .video-js .vjs-control-bar{box-sizing:border-box;left:12px;right:12px;bottom:8px;width:auto;height:59px;padding:3px 0 0;display:flex;align-items:flex-end;border-radius:0;background:transparent;backdrop-filter:none}@@ -1032,22 +1035,28 @@ body.index-open #tiers,body.index-open #tagbar{display:none}.vwrap .video-js.vjs-playing .vjs-control-bar>.vjs-play-control .vjs-icon-placeholder:after{left:56%;width:4px;height:16px;transform:translate(-50%,-50%)}.vwrap .video-js .vjs-volume-panel>.vjs-mute-control .vjs-icon-placeholder:before,.vwrap .video-js .vjs-peach-right-controls .vjs-icon-placeholder:before{display:grid;place-items:center;width:100%;height:100%;line-height:normal;filter:drop-shadow(0 0 1px rgba(0,0,0,.8))}-.vwrap .video-js [data-peach-explicit-icon]>.vjs-icon-placeholder:before{display:none}+.vwrap .video-js [data-peach-explicit-icon]>.vjs-icon-placeholder:before,+.vwrap .video-js [data-peach-explicit-icon]>.vjs-icon-placeholder:after{display:none}.vjs-peach-control-icon{position:absolute;z-index:2;left:50%;top:50%;width:24px;height:24px;display:block;- transform:translate(-50%,-50%);fill:currentColor;stroke:none;filter:drop-shadow(0 0 1px rgba(0,0,0,.8));pointer-events:none}+ transform:translate(-50%,-50%) scale(1);fill:currentColor;stroke:none;filter:drop-shadow(0 0 1px rgba(0,0,0,.8));pointer-events:none;+ transition:transform .1s cubic-bezier(.05,0,0,1)}+.vwrap .video-js [data-peach-explicit-icon]:active>.vjs-peach-control-icon{transform:translate(-50%,-50%) scale(.9)}.vjs-peach-hover{position:absolute;z-index:0;left:0;top:4px;width:100%;height:32px;border-radius:40px;pointer-events:none;background:transparent;transition:background .2s cubic-bezier(.05,0,0,1)}.vwrap .video-js .vjs-control-bar>.vjs-play-control:hover>.vjs-peach-hover,.vwrap .video-js .vjs-control-bar>.vjs-play-control:focus-visible>.vjs-peach-hover,+.vwrap .video-js .vjs-control-bar>.vjs-volume-panel:hover>.vjs-peach-hover,+.vwrap .video-js .vjs-control-bar>.vjs-volume-panel:focus-within>.vjs-peach-hover,.vjs-peach-right-controls>.vjs-control:hover>.vjs-peach-hover,.vjs-peach-right-controls>.vjs-control:focus-within>.vjs-peach-hover{background:rgba(255,255,255,.1)}.vwrap .video-js .vjs-control-bar>.vjs-play-control:active>.vjs-peach-hover,+.vwrap .video-js .vjs-control-bar>.vjs-volume-panel:active>.vjs-peach-hover,.vjs-peach-right-controls>.vjs-control:active>.vjs-peach-hover{background:rgba(255,255,255,.2)}.vwrap .video-js .vjs-control-bar>.vjs-play-control .vjs-icon-placeholder,.vwrap .video-js .vjs-peach-right-controls button,.vjs-peach-settings>button,.vjs-peach-theater>button{position:relative;z-index:1}.vwrap .video-js .vjs-control-bar>.vjs-volume-panel{box-sizing:border-box;position:relative;align-self:flex-end;flex:0 0 40px;width:40px;height:40px!important;margin:0 0 8px 12px;padding:0;border:0;border-radius:28px;background:rgba(0,0,0,.6);box-shadow:none;- overflow:visible;transition:width .2s cubic-bezier(0,0,.2,1),flex-basis .2s cubic-bezier(0,0,.2,1),padding-right .2s cubic-bezier(0,0,.2,1)}+ display:flex;align-items:center;isolation:isolate;overflow:visible;transition:width .2s cubic-bezier(.05,0,0,1),flex-basis .2s cubic-bezier(.05,0,0,1),padding-right .2s cubic-bezier(.05,0,0,1)}.vwrap .video-js .vjs-control-bar>.vjs-volume-panel:hover,.vwrap .video-js .vjs-control-bar>.vjs-volume-panel:focus-within{flex-basis:111px;width:111px;padding-right:16px;background:rgba(0,0,0,.6)}.stage.theater-mode .vwrap .video-js .vjs-control-bar>.vjs-volume-panel,@@ -1057,7 +1066,7 @@ body.index-open #tiers,body.index-open #tagbar{display:none}.video-js.vjs-fullscreen .vjs-control-bar>.vjs-volume-panel:hover,.video-js.vjs-fullscreen .vjs-control-bar>.vjs-volume-panel:focus-within{background:rgba(0,0,0,.6)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}-.vwrap .video-js .vjs-volume-panel>.vjs-mute-control{flex:0 0 40px;width:40px;height:40px;margin:0;border:0;background:transparent}+.vwrap .video-js .vjs-volume-panel>.vjs-mute-control{box-sizing:border-box;position:relative!important;left:0!important;top:0!important;flex:0 0 40px;width:40px!important;min-width:40px;height:40px!important;margin:0!important;padding:0!important;border:0;background:transparent;transform:none!important}.vwrap .video-js .vjs-volume-panel>.vjs-volume-control.vjs-volume-horizontal{display:block;flex:0 0 52px;width:52px;height:40px;margin:0 3px 0 0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .1s cubic-bezier(0,0,.2,1)}.vwrap .video-js .vjs-volume-panel:hover>.vjs-volume-control.vjs-volume-horizontal,.vwrap .video-js .vjs-volume-panel:focus-within>.vjs-volume-control.vjs-volume-horizontal{opacity:1;visibility:visible;pointer-events:auto;transition-delay:.08s}@@ -1076,14 +1085,14 @@ body.index-open #tiers,body.index-open #tagbar{display:none}.vwrap .video-js .vjs-peach-right-controls>.vjs-control>button:focus-visible{outline:0;box-shadow:none}.vwrap .video-js .vjs-progress-control{position:absolute;left:0;right:0;top:0;width:auto;height:6px;min-width:0;display:flex;align-items:center}-.vwrap .video-js .vjs-progress-control .vjs-progress-holder{width:100%;height:3px;margin:0;border-radius:0;background:rgba(40,40,40,.6);transition:height .1s cubic-bezier(.4,0,1,1)}-.vwrap .video-js .vjs-progress-control:hover .vjs-progress-holder,.vwrap .video-js .vjs-progress-control:focus-within .vjs-progress-holder{height:4px}+.vwrap .video-js .vjs-progress-control .vjs-progress-holder{width:100%;height:6px;margin:0;border-radius:0;background:rgba(255,255,255,.2);transform:scaleY(.667);transition:transform .2s cubic-bezier(.05,0,0,1)}+.vwrap .video-js .vjs-progress-control:hover .vjs-progress-holder,.vwrap .video-js .vjs-progress-control:focus-within .vjs-progress-holder{transform:scaleY(1)}.vwrap .video-js .vjs-load-progress{background:rgba(255,255,255,.4)}.vwrap .video-js .vjs-load-progress div{background:rgba(255,255,255,.2)}.vwrap .video-js .vjs-play-progress{background:var(--tungsten)}.vwrap .video-js .vjs-play-progress:before{content:"";position:absolute;right:-6px;top:50%;width:12px;height:12px;- border-radius:50%;background:var(--tungsten);transform:translateY(-50%) scale(0);box-shadow:none;transition:transform .1s cubic-bezier(.4,0,1,1)}-.vwrap .video-js .vjs-progress-control:hover .vjs-play-progress:before,.vwrap .video-js .vjs-progress-control:focus-within .vjs-play-progress:before{transform:translateY(-50%) scale(1)}+ border-radius:50%;background:var(--tungsten);transform:translateY(-50%) scale(0);box-shadow:none;transition:transform .2s cubic-bezier(.05,0,0,1)}+.vwrap .video-js .vjs-progress-control:hover .vjs-play-progress:before,.vwrap .video-js .vjs-progress-control:focus-within .vjs-play-progress:before{transform:translateY(-50%) scale(1.67)}.vwrap .video-js .vjs-mouse-display .vjs-time-tooltip{display:none}.vjs-peach-seek-preview{position:absolute;z-index:4;bottom:calc(100% + 10px);transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;pointer-events:none;color:#fff}@@ -1097,8 +1106,11 @@ body.index-open #tiers,body.index-open #tagbar{display:none}.vwrap .video-js .vjs-time-control{display:none!important}.vwrap .video-js .vjs-peach-time{box-sizing:border-box;align-self:flex-end;flex:0 0 auto;width:auto;height:40px;margin:0 0 8px 12px;padding:0 16px;border:0;border-radius:28px;background:rgba(0,0,0,.6);color:#fff;cursor:pointer;- font:400 var(--fs-md)/40px Arial,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 0 1px rgba(0,0,0,.8)}-.vwrap .video-js .vjs-peach-time:hover,.vwrap .video-js .vjs-peach-time:focus-visible{background:rgba(0,0,0,.72);outline:0}+ position:relative;isolation:isolate;overflow:hidden;font:400 var(--fs-md)/40px Arial,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 0 1px rgba(0,0,0,.8)}+.vwrap .video-js .vjs-peach-time:after{content:"";position:absolute;z-index:0;inset:4px;border-radius:28px;background:transparent;transition:background .2s cubic-bezier(.05,0,0,1)}+.vwrap .video-js .vjs-peach-time:hover:after,.vwrap .video-js .vjs-peach-time:focus-visible:after{background:rgba(255,255,255,.1)}+.vwrap .video-js .vjs-peach-time:active:after{background:rgba(255,255,255,.2)}+.vwrap .video-js .vjs-peach-time:focus-visible{outline:0}.vjs-peach-time-text{position:relative;z-index:1}.vjs-peach-settings,.vjs-peach-theater{position:relative;flex:0 0 48px;width:48px!important;min-width:48px}.vjs-peach-settings>button,.vjs-peach-theater>button{width:100%;height:100%;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;display:grid;place-items:center}.vjs-peach-settings>button>svg,.vjs-peach-theater>button>svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:2;filter:drop-shadow(0 0 1px rgba(0,0,0,.8))}@@ -1109,15 +1121,18 @@ body.index-open #tiers,body.index-open #tagbar{display:none}padding:8px;border:0;border-radius:12px;background:rgba(0,0,0,.6);box-shadow:none;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);color:#fff;text-shadow:0 0 1px rgba(0,0,0,.8);font:400 var(--fs-md)/1.3 Arial,sans-serif}.vjs-peach-settings-menu[hidden]{display:none}-.vjs-peach-settings-menu button{box-sizing:border-box;width:100%;min-height:48px;padding:0;border:0;border-radius:8px;background:transparent;color:#fff;font:inherit;cursor:pointer}-.vjs-peach-settings-menu button:hover,.vjs-peach-settings-menu button:focus-visible{background:rgba(255,255,255,.1);outline:0}-.vjs-peach-settings-menu button:active{background:rgba(255,255,255,.2)}+.vjs-peach-settings-menu button{box-sizing:border-box;position:relative;isolation:isolate;overflow:hidden;width:100%;min-height:48px;padding:0;border:0;border-radius:8px;background:transparent;color:#fff;font:inherit;cursor:pointer}+.vjs-peach-settings-menu button:before{content:"";position:absolute;z-index:0;inset:0;border-radius:inherit;background:transparent;pointer-events:none;transition:background .1s cubic-bezier(.05,0,0,1)}+.vjs-peach-settings-menu button:hover:before,.vjs-peach-settings-menu button:focus-visible:before{background:rgba(255,255,255,.1)}+.vjs-peach-settings-menu button:active:before{background:rgba(255,255,255,.2)}+.vjs-peach-settings-menu button:focus-visible{outline:0}+.vjs-peach-settings-menu button>*{position:relative;z-index:1}.video-js .vjs-peach-menu-row{display:grid;grid-template-columns:56px minmax(0,1fr) auto 18px;gap:0;align-items:center;text-align:left}.vjs-peach-menu-row>svg{justify-self:start;margin-left:8px;width:24px;height:24px;stroke:currentColor;fill:none}.vjs-peach-menu-row>span{font-size:var(--fs-md);line-height:18.2px}.vjs-peach-menu-row>b{padding-left:8px;font-size:var(--fs-md);line-height:18.2px;font-weight:400;color:rgba(255,255,255,.7);white-space:nowrap}.vjs-peach-menu-row>svg:last-child{width:18px;height:18px;color:rgba(255,255,255,.7)}-.vjs-peach-menu-row[data-player-ambient]{grid-template-columns:56px minmax(0,1fr) auto}.vjs-peach-switch{position:relative;width:40px;height:24px;border-radius:12px;background:rgba(255,255,255,.3)}-.vjs-peach-switch:after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:none;transition:transform .2s cubic-bezier(.05,0,0,1)}-.vjs-peach-menu-row[aria-checked="true"] .vjs-peach-switch{background:rgba(255,255,255,.3)}.vjs-peach-menu-row[aria-checked="true"] .vjs-peach-switch:after{transform:translateX(16px)}+.vjs-peach-menu-row[data-player-ambient]{grid-template-columns:56px minmax(0,1fr) auto}.vjs-peach-switch{box-sizing:border-box;display:block;position:relative;width:40px;height:24px;border-radius:12px;background:rgba(0,0,0,.3)}+.vjs-peach-switch:after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:rgba(255,255,255,.7);box-shadow:none;transition:transform .2s cubic-bezier(.05,0,0,1),background .2s cubic-bezier(.05,0,0,1)}+.vjs-peach-menu-row[aria-checked="true"] .vjs-peach-switch{background:rgba(255,255,255,.3)}.vjs-peach-menu-row[aria-checked="true"] .vjs-peach-switch:after{background:#fff;transform:translateX(16px)}.vjs-peach-panel-header{box-sizing:border-box;height:57px;padding:8px;display:flex;align-items:center;gap:8px;color:#eee}.vjs-peach-panel-header .vjs-peach-menu-back{flex:0 0 32px;width:32px;min-height:32px;height:32px!important;display:grid;place-items:center;border:0!important;border-radius:50%!important;color:#eee}.vjs-peach-panel-header .vjs-peach-menu-back svg{width:24px;height:24px;display:block;stroke:currentColor;fill:none;stroke-width:2}@@ -1144,10 +1159,10 @@ body.index-open #tiers,body.index-open #tagbar{display:none}}.vwrap .video-js.vjs-error .vjs-error-display .vjs-modal-dialog-content{display:flex;align-items:center;justify-content:center;padding:56px 24px;text-align:center;overflow-wrap:anywhere}-.vwrap>.video-js.vjs-fullscreen,.video-js.vjs-fullscreen{width:100%!important;height:100%!important;- max-width:none!important;max-height:none!important;aspect-ratio:auto!important}-.vwrap>.video-js.vjs-fullscreen .vjs-tech,.video-js.vjs-fullscreen .vjs-tech{- width:100%;height:100%;object-fit:contain}+.vwrap>.video-js.vjs-fullscreen,.video-js.vjs-fullscreen,.video-js:fullscreen,.video-js:-webkit-full-screen{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;padding:0!important;+ max-width:none!important;max-height:none!important;aspect-ratio:auto!important;z-index:10000!important}+.vwrap>.video-js.vjs-fullscreen .vjs-tech,.video-js.vjs-fullscreen .vjs-tech,.video-js:fullscreen .vjs-tech,.video-js:-webkit-full-screen .vjs-tech{+ position:absolute!important;inset:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;object-fit:contain}.playerstatsbtn{position:absolute;left:11px;top:11px;z-index:8;width:40px;height:40px;padding:0;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(0,0,0,.3);color:#fff;cursor:pointer;box-shadow:none}diff --git a/web/app.js b/web/app.jsindex 6138de8e5..ef8e7131a 100644--- a/web/app.js+++ b/web/app.js@@ -511,9 +511,9 @@ function mountPlayerQualityControl(player,video,fallbackHeight=0){const showMain=()=>{const {active}=qualityRows(),speed=Number(player.playbackRate())||1;menu.innerHTML=`<button type="button" class="vjs-peach-menu-row" role="menuitemcheckbox" data-player-ambient aria-checked="${appSettings.ambientMode}">- ${icon('monitor-cog')}<span>氛围模式</span><i class="vjs-peach-switch" aria-hidden="true"></i></button>- <button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-speed>${icon('gauge')}<span>播放速度</span><b>${speed===1?'正常':speed+'×'}</b>${icon('chevron-right')}</button>- <button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-quality-view>${icon('sliders-horizontal')}<span>清晰度</span><b>${esc(active.label)}</b>${icon('chevron-right')}</button>`;+ ${icon('player-ambient')}<span>氛围模式</span><i class="vjs-peach-switch" aria-hidden="true"></i></button>+ <button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-speed>${icon('player-speed')}<span>播放速度</span><b>${speed===1?'正常':speed+'×'}</b>${icon('chevron-right')}</button>+ <button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-quality-view>${icon('player-quality')}<span>清晰度</span><b>${esc(active.label)}</b>${icon('chevron-right')}</button>`;menu.querySelector('[data-player-ambient]').onclick=()=>{applyAmbientMode(!appSettings.ambientMode);showMain()};menu.querySelector('[data-player-speed]').onclick=showSpeed;menu.querySelector('[data-player-quality-view]').onclick=showQuality;@@ -563,16 +563,22 @@ function mountPlayerChromeLayout(player){button.insertAdjacentHTML('beforeend',icon(name,'vjs-peach-control-icon'));return button.querySelector(':scope>.vjs-peach-control-icon use');};+ const playUse=explicitIcon(play,'player-play');+ const syncPlayIcon=()=>playUse?.setAttribute('href',player.paused()||player.ended()?'#i-player-play':'#i-player-pause');+ player.on(['play','pause','ended'],syncPlayIcon);syncPlayIcon();const volume=controlBar.querySelector(':scope>.vjs-volume-panel');+ if(volume&&!volume.querySelector(':scope>.vjs-peach-hover'))volume.insertAdjacentHTML('afterbegin','<span class="vjs-peach-hover" aria-hidden="true"></span>');const mute=volume?.querySelector(':scope>.vjs-mute-control'),muteUse=explicitIcon(mute,'player-volume');const syncVolumeIcon=()=>muteUse?.setAttribute('href',player.muted()||player.volume()===0?'#i-player-volume-muted':'#i-player-volume');player.on('volumechange',syncVolumeIcon);syncVolumeIcon();const time=document.createElement('button');let remaining=false;time.type='button';time.className='vjs-peach-time vjs-control';time.dataset.playerTime='';+ time.innerHTML='<span class="vjs-peach-time-text"></span>';+ const timeText=time.querySelector('.vjs-peach-time-text');const syncTime=()=>{const current=Math.max(0,Number(player.currentTime())||0),duration=Math.max(0,Number(player.duration())||0);const shown=remaining?`-${fmtClock(Math.max(0,duration-current))}`:fmtClock(current);- time.textContent=`${shown} / ${fmtClock(duration)}`;+ timeText.textContent=`${shown} / ${fmtClock(duration)}`;time.dataset.remaining=String(remaining);time.setAttribute('aria-label',remaining?`剩余 ${fmtClock(Math.max(0,duration-current))},总时长 ${fmtClock(duration)};点击显示已播放时间`:`已播放 ${fmtClock(current)},总时长 ${fmtClock(duration)};点击显示剩余时间`);};@@ -638,7 +644,9 @@ function mountPlayerCenterControls(player){player.el().append(root);const toggle=root.querySelector('[data-center-toggle]');const sync=()=>{const playing=!player.paused()&&!player.ended();root.dataset.state=playing?'pause':'play';toggle.setAttribute('aria-label',playing?'暂停':'播放')};- toggle.onclick=event=>{event.stopPropagation();if(player.paused()||player.ended())player.play().catch(()=>{});else player.pause()};+ const feedback=()=>{root.classList.remove('is-feedback');void root.offsetWidth;root.classList.add('is-feedback')};+ toggle.onclick=event=>{event.stopPropagation();feedback();if(player.paused()||player.ended())player.play().catch(()=>{});else player.pause()};+ toggle.addEventListener('animationend',()=>root.classList.remove('is-feedback'));player.on(['play','pause','ended'],sync);sync();}function mountDetailPlayer(it,video,autoplay,options={}){diff --git a/web/index.html b/web/index.htmlindex 8d188d89c..648d8822c 100644--- a/web/index.html+++ b/web/index.html@@ -39,8 +39,13 @@<symbol id="i-player-volume" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M11.6 2.08a1 1 0 0 1 1.4.92v18a1 1 0 0 1-1.52.85L3.91 17.31A6 6 0 0 1 1 12v-.17a6 6 0 0 1 2.91-5.15z"/><path d="M15.53 7.05a1 1 0 0 1 1.42 0A7 7 0 0 1 19 12a7 7 0 0 1-2.05 4.95 1 1 0 1 1-1.42-1.42A5 5 0 0 0 17 12a5 5 0 0 0-1.47-3.53 1 1 0 0 1 0-1.42Z"/><path d="M18.36 4.22a1 1 0 0 1 1.41 0A11 11 0 0 1 23 12a11 11 0 0 1-3.23 7.78 1 1 0 0 1-1.41-1.42A9 9 0 0 0 21 12a9 9 0 0 0-2.64-6.36 1 1 0 0 1 0-1.42Z"/></symbol><symbol id="i-player-volume-muted" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M11.6 2.08a1 1 0 0 1 1.4.92v18a1 1 0 0 1-1.52.85L3.91 17.31A6 6 0 0 1 1 12v-.17a6 6 0 0 1 2.91-5.15z"/><path d="m16.7 8.3 2.3 2.3 2.3-2.3 1.4 1.4-2.3 2.3 2.3 2.3-1.4 1.4-2.3-2.3-2.3 2.3-1.4-1.4 2.3-2.3-2.3-2.3z"/></symbol><symbol id="i-player-pip" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path fill-rule="evenodd" d="M3 4h18a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm0 2v12h18V6H3Zm10 5h7v5h-7v-5Z"/></symbol>+ <symbol id="i-player-play" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M7 4.82a1.5 1.5 0 0 1 2.28-1.28l10.1 6.18a1.5 1.5 0 0 1 0 2.56l-10.1 6.18A1.5 1.5 0 0 1 7 17.18V4.82Z"/></symbol>+ <symbol id="i-player-pause" viewBox="0 0 24 24" fill="currentColor" stroke="none"><rect x="6" y="4" width="4.5" height="16" rx="1"/><rect x="13.5" y="4" width="4.5" height="16" rx="1"/></symbol><symbol id="i-player-fullscreen-enter" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M10 3H3v7a1 1 0 0 0 2 0V6.41l4.29 4.29a1 1 0 0 0 1.41-1.41L6.41 5H10a1 1 0 0 0 0-2Zm10 10a1 1 0 0 0-1 1v3.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29H14a1 1 0 0 0 0 2h7v-7a1 1 0 0 0-1-1Z"/></symbol><symbol id="i-player-fullscreen-exit" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M4 13a1 1 0 0 0 0 2h3.59L3.3 19.29a1 1 0 1 0 1.41 1.42L9 16.41V20a1 1 0 0 0 2 0v-7H4Zm16-2a1 1 0 0 0 0-2h-3.59l4.3-4.29a1 1 0 0 0-1.42-1.42L15 7.59V4a1 1 0 0 0-2 0v7h7Z"/></symbol>+ <symbol id="i-player-ambient" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="6" width="14" height="11" rx="1"/><path d="M9 20h6M12 17v3M3 8H1M23 8h-2M5 3 3.5 1.5M19 3l1.5-1.5M3 15H1M23 15h-2"/></symbol>+ <symbol id="i-player-speed" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19.8 17a9 9 0 1 1 .2-9.7"/><path d="m13.2 12.8 4.4-4.4"/></symbol>+ <symbol id="i-player-quality" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h3M11 6h9M4 12h9M17 12h3M4 18h5M13 18h7"/><circle cx="9" cy="6" r="2"/><circle cx="15" cy="12" r="2"/><circle cx="11" cy="18" r="2"/></symbol><symbol id="i-history" viewBox="0 0 24 24"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" /><path d="M12 7v5l4 2" /></symbol><symbol id="i-sparkles" viewBox="0 0 24 24"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /><path d="M20 2v4" /><path d="M22 4h-4" /><circle cx="4" cy="20" r="2" /></symbol><symbol id="i-x" viewBox="0 0 24 24"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></symbol>