Skip to content

fix: 避免 MP4 和 HLS 分片被误判为播放列表 - #5

Open
AirSnailArtist wants to merge 1 commit into
zhoufuweigg:mainfrom
AirSnailArtist:codex/fix-media-format
Open

AirSnailArtist wants to merge 1 commit into
zhoufuweigg:mainfrom
AirSnailArtist:codex/fix-media-format

Conversation

@AirSnailArtist

Copy link
Copy Markdown

当 MP4 的签名 URL 参数包含 hls/m3u8,或者 HLS 会话代理二进制分片时,原生代理会把媒体误判为播放列表,导致读取失败或 502。改为根据资产类型、响应 MIME、最终 URL 的路径和已有内容嗅探判断,避免会话密钥把所有分片都标成列表。

验证:增加带签名参数的大 MP4 和含 HLS 密钥会话的二进制分片两项回归;本地 go test ./core -run 'TestNative(HLS|Playback|Stream|Encrypted|Read)' -count=1 通过。

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.

1 participant