Repository navigation
feat: 支持音频和视频文件预览 - #1217
Merged
Merged
feat: 支持音频和视频文件预览#1217
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
|
@codex, review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
简介
会话工作区能为 MP3 等文件打开标签,但预览区没有播放器。工作区与交付卡片共用的文件预览现在识别音视频类型,浏览器提供原生播放、暂停和进度控制。
切换文件、关闭标签或离开预览区域会停止播放。文件无法解码时,预览区显示错误提示,仍可下载原件。
具体改动与影响
界面变更
Chrome 验证了会话工作区的 MP3 播放器、MP4 播放器、1024px 深色模式、损坏文件提示,以及从交付卡片打开的视频。使用测试生成的媒体,截图随交付说明附上。
实现依据与设计取舍
关键行为与实现边界
决策记录
文件预览使用浏览器原生播放器记录沿用现有预览链路的理由,以及流式端点和转码的成本。
验证情况
行为验证
提交检查
python3 scripts/ci/verify_engineering_contracts.py、python3 -m unittest scripts.ci.test_verify_engineering_contracts(56 项)、git diff --check。docker compose exec frontend pnpm run lint:check、pnpm run test:unit(1242 项)、pnpm run build。cd docs && pnpm run build。现有相对链接由 VitePress 与工程契约检查验证。ruff check yuxi、ruff format yuxi --check、ruff check --select I yuxi。测试文件的 Ruff lint 通过。docker compose exec api uv run --no-sync --group test pytest test/unit -m "not slow"(4127 通过,128 跳过)。python -m pytest backend/test/unit/config -q(211 项)覆盖 Compose 挂载内不可见的仓库级配置。独立审阅、风险与事故反馈
独立审阅
独立 Reviewer 核对需求、完整 diff、测试、API 响应与真实浏览器负控。首审发现个人空间设备页可继续播放,修复后复审核对设备切换和路由离开均卸载播放器,最终 API 契约文档补审通过。
未验证范围与已知风险
事故反馈
局部预览缺口。将签名识别、鉴权响应和浏览器播放纳入回归证据。