Skip to content

fix: 支持已下载的 Windows UNC 音频进入本地播放 - #249

Merged
teikengstudio merged 1 commit into
teikengstudio:mainfrom
Aschenbath:fix/play-completed-unc-audio
Nov 11, 2026
Merged

teikengstudio merged 1 commit into
teikengstudio:mainfrom
Aschenbath:fix/play-completed-unc-audio

Conversation

@Aschenbath

@Aschenbath Aschenbath commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Windows 共享目录已生成完整下载后,播放器原先拒绝带主机名的 file URI。现在允许可转换的 Windows UNC 文件,并向 media_kit 传入原生文件路径,避免其 URI 规范化丢失 UNC 主机名。普通本地文件和受限的本机 HTTP 音频代理继续可用。

文件 URI 仍排除用户信息、端口、查询和片段,要求绝对路径且能转换为平台文件路径。

独立提交 c2b2762 和组合 1845475 静态分析通过,独立窗口各 10/10 项通过:真实 FFmpeg 与既有 localhost/H$ 共享成品、10 个特殊文件名的媒体库路径及内容一致性、非法 URI 拒绝、真实 AudioProxy 全量和 Range 读取。

原复现脚本审计保留为 1 过 / 1 失败:旧断言要求 native guard 继续拒绝,而修复后已进入原生初始化。独立副本改为媒体库路径和文件内容验证;该测试环境缺少 libmpv-2.dll,未验证物理音频解码或实际发声。HTTP 内容为合成数据,无真实账号或扣费。

Closes #245

@Aschenbath Aschenbath left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作者 review(c2b2762):接受独立审阅发现的第二处问题,不能仅放开file.host;MediaKitAudioDriver现向Media传toFilePath得到的原生路径,代理HTTP仍传URI。file主机只在Windows开放,无用户信息/端口/查询/片段,检查绝对路径和可转换性。原复现另有断言要求native guard继续抛ArgumentError,正确修复后不成立,独立窗口会保持原件审计并透明适配。静态分析通过,交叉验证进行中。

@Aschenbath Aschenbath left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 回复(提交 c2b2762):已处理“仅允许 file.host 仍被 media_kit 规范化丢失主机名”的发现,MediaKitAudioDriver 先 toFilePath 再构建 Media。独立窗口在独立提交及组合 1845475 各通过 10/10 项:真实 drive/localhost H$ 成品、特殊文件名读取一致、非法 file/远端 HTTP 拒绝和真实 AudioProxy 200/206 读取。原件 SHA 未变,其旧 nativeFailure isArgumentError 断言失败单独保留;独立副本改用真实 Media.normalizeURI+磁盘字节比对。缺 libmpv-2.dll,不把录制驱动 play 当作物理解码成功。未发现新增阻断问题;静态分析通过,临时测试环境已清理。

@teikengstudio
teikengstudio merged commit 360098f into teikengstudio:main Nov 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: UNC 共享目录下载成功后仍被播放器拒绝,无法本地播放

2 participants