mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
Fix direct stream not working in Safari (#2581)
This commit is contained in:
parent
ea2fcd9d7f
commit
31cb8e2cbd
1 changed files with 5 additions and 2 deletions
|
|
@ -58,8 +58,11 @@ func (s *SceneServer) StreamSceneDirect(scene *models.Scene, w http.ResponseWrit
|
||||||
|
|
||||||
filepath := GetInstance().Paths.Scene.GetStreamPath(scene.Path, scene.GetHash(fileNamingAlgo))
|
filepath := GetInstance().Paths.Scene.GetStreamPath(scene.Path, scene.GetHash(fileNamingAlgo))
|
||||||
streamRequestCtx := NewStreamRequestContext(w, r)
|
streamRequestCtx := NewStreamRequestContext(w, r)
|
||||||
lockCtx := GetInstance().ReadLockManager.ReadLock(streamRequestCtx, filepath)
|
|
||||||
defer lockCtx.Cancel()
|
// #2579 - hijacking and closing the connection here causes video playback to fail in Safari
|
||||||
|
// We trust that the request context will be closed, so we don't need to call Cancel on the
|
||||||
|
// returned context here.
|
||||||
|
_ = GetInstance().ReadLockManager.ReadLock(streamRequestCtx, filepath)
|
||||||
http.ServeFile(w, r, filepath)
|
http.ServeFile(w, r, filepath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue