mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 07:05:24 +03:00
don't adjust playback rate if we just started streaming
This commit is contained in:
parent
5ee5b7a5a0
commit
03640473b7
@ -364,9 +364,11 @@ function MSEPlayer({
|
|||||||
const beta = 0.5; // steepness of exponential growth
|
const beta = 0.5; // steepness of exponential growth
|
||||||
|
|
||||||
// don't adjust playback rate if we're close enough to live
|
// don't adjust playback rate if we're close enough to live
|
||||||
|
// or if we just started streaming
|
||||||
if (
|
if (
|
||||||
(bufferTime <= bufferThreshold && bufferThreshold < 3) ||
|
((bufferTime <= bufferThreshold && bufferThreshold < 3) ||
|
||||||
bufferTime < 3
|
bufferTime < 3) &&
|
||||||
|
bufferTimes.current.length <= MAX_BUFFER_ENTRIES
|
||||||
) {
|
) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -517,9 +519,11 @@ function MSEPlayer({
|
|||||||
jumpToLive();
|
jumpToLive();
|
||||||
} else {
|
} else {
|
||||||
// increase/decrease playback rate to compensate - non Safari/iOS only
|
// increase/decrease playback rate to compensate - non Safari/iOS only
|
||||||
|
if (videoRef.current.playbackRate !== playbackRate) {
|
||||||
videoRef.current.playbackRate = playbackRate;
|
videoRef.current.playbackRate = playbackRate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (onError != undefined) {
|
if (onError != undefined) {
|
||||||
if (videoRef.current?.paused) {
|
if (videoRef.current?.paused) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user