fix: restream message, if not synched

This commit is contained in:
antebrl
2024-12-21 12:12:49 +00:00
parent 3701d5bd43
commit 9fba7a49f1

View File

@@ -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,
@@ -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;