mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Ensure playback rate stays teh same when source changes
This commit is contained in:
parent
b4517ac33e
commit
ec436b71c8
@ -62,6 +62,8 @@ export default function HlsVideoPlayer({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const currentPlaybackRate = videoRef.current.playbackRate;
|
||||||
|
|
||||||
if (!hlsRef.current) {
|
if (!hlsRef.current) {
|
||||||
videoRef.current.src = currentSource;
|
videoRef.current.src = currentSource;
|
||||||
videoRef.current.load();
|
videoRef.current.load();
|
||||||
@ -69,6 +71,7 @@ export default function HlsVideoPlayer({
|
|||||||
}
|
}
|
||||||
|
|
||||||
hlsRef.current.loadSource(currentSource);
|
hlsRef.current.loadSource(currentSource);
|
||||||
|
videoRef.current.playbackRate = currentPlaybackRate;
|
||||||
}, [videoRef, hlsRef, currentSource]);
|
}, [videoRef, hlsRef, currentSource]);
|
||||||
|
|
||||||
// controls
|
// controls
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user