mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix direct streaming
This commit is contained in:
@@ -311,10 +311,11 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
|
|||||||
function handleOffset(player: VideoJsPlayer) {
|
function handleOffset(player: VideoJsPlayer) {
|
||||||
if (!scene || !file) return;
|
if (!scene || !file) return;
|
||||||
|
|
||||||
const currentSrc = player.currentSrc();
|
const currentSrc = new URL(player.currentSrc());
|
||||||
|
|
||||||
const isDirect =
|
const isDirect =
|
||||||
currentSrc.endsWith("/stream") || currentSrc.endsWith("/stream.m3u8");
|
currentSrc.pathname.endsWith("/stream") ||
|
||||||
|
currentSrc.pathname.endsWith("/stream.m3u8");
|
||||||
|
|
||||||
const curTime = player.currentTime();
|
const curTime = player.currentTime();
|
||||||
if (!isDirect) {
|
if (!isDirect) {
|
||||||
|
|||||||
Reference in New Issue
Block a user