From 90fdc6b3226addcb10c98f53ccf6a7bfbff338a2 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Mon, 10 Oct 2022 18:54:55 +1100 Subject: [PATCH] Fix direct streaming --- ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx b/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx index 9f5ad7080..962415727 100644 --- a/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx +++ b/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx @@ -311,10 +311,11 @@ export const ScenePlayer: React.FC = ({ function handleOffset(player: VideoJsPlayer) { if (!scene || !file) return; - const currentSrc = player.currentSrc(); + const currentSrc = new URL(player.currentSrc()); const isDirect = - currentSrc.endsWith("/stream") || currentSrc.endsWith("/stream.m3u8"); + currentSrc.pathname.endsWith("/stream") || + currentSrc.pathname.endsWith("/stream.m3u8"); const curTime = player.currentTime(); if (!isDirect) {