优化起播

This commit is contained in:
truewhile
2026-09-22 22:30:52 +08:00
parent b5ce4646cf
commit 016c6687e9
12 changed files with 861 additions and 19 deletions
+3
View File
@@ -145,6 +145,9 @@ func (b *serviceContainerBuilder) initContentServices() {
b.c.Transcoder.SetStrmPlayTargetResolver(b.c.Strm.ResolvePlayTarget)
b.c.Transcoder.SetProbe(b.c.FFprobe)
b.c.Subtitle.SetStrmPlayTargetResolver(b.c.Strm.ResolvePlayTarget)
// 播放链路:/Videos/{id}/stream 与 /api/stream/{id} 在服务端完成换链后直接
// 302 到最终直链,客户端少跟随一次 302(高延迟线路上省一个往返)。
b.c.Stream.SetStrmPlayTargetResolver(b.c.Strm.ResolvePlayTargetWithUA)
// 弹幕识别需要把远程 Emby 条目解析为 Media 元数据及可拉取前 16MB 的直链 URL。
if b.c.EmbyRemote != nil {
b.c.Danmaku.SetRemoteMediaResolver(func(ctx context.Context, encodedID string) (*model.Media, string, error) {