Skip to content

Commit

Permalink
fix: restream message, if not synched
Browse files Browse the repository at this point in the history
  • Loading branch information
antebrl committed Dec 21, 2024
1 parent 3701d5b commit 9fba7a4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions frontend/src/components/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ function VideoPlayer({ channel, syncEnabled }: VideoPlayerProps) {
hlsRef.current.destroy();
}

clearToasts();
let toastStartId = null;
toastStartId = addToast({
type: 'loading',
title: channel.restream ? 'Starting Restream': 'Starting Stream',
message: 'This might take a few moments...',
duration: 0,
});

const hls = new Hls({
autoStartLoad: syncEnabled ? false : true,
liveDurationInfinity: true,
Expand Down Expand Up @@ -71,6 +62,15 @@ function VideoPlayer({ channel, syncEnabled }: VideoPlayerProps) {

if(!syncEnabled) return;

clearToasts();
let toastStartId = null;
toastStartId = addToast({
type: 'loading',
title: channel.restream ? 'Starting Restream': 'Starting Stream',
message: 'This might take a few moments...',
duration: 0,
});

const tolerance = import.meta.env.VITE_SYNCHRONIZATION_TOLERANCE || 0.8;
const maxDeviation = import.meta.env.VITE_SYNCHRONIZATION_MAX_DEVIATION || 4;

Expand Down

0 comments on commit 9fba7a4

Please sign in to comment.