mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +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;
|
||||
}
|
||||
|
||||
const currentPlaybackRate = videoRef.current.playbackRate;
|
||||
|
||||
if (!hlsRef.current) {
|
||||
videoRef.current.src = currentSource;
|
||||
videoRef.current.load();
|
||||
@ -69,6 +71,7 @@ export default function HlsVideoPlayer({
|
||||
}
|
||||
|
||||
hlsRef.current.loadSource(currentSource);
|
||||
videoRef.current.playbackRate = currentPlaybackRate;
|
||||
}, [videoRef, hlsRef, currentSource]);
|
||||
|
||||
// controls
|
||||
|
||||
Loading…
Reference in New Issue
Block a user