fix(ui): cap video framerate for mobile to 100hz (#1898)

This commit is contained in:
Delirium 2024-02-20 14:26:49 +01:00 committed by GitHub
parent 707939a37f
commit 452dde1620
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,8 @@ function ReplayWindow({ videoURL, userDevice }: Props) {
React.useEffect(() => {
if (videoRef.current) {
const timeSecs = time / 1000
if (videoRef.current.duration >= timeSecs) {
const delta = videoRef.current.currentTime - timeSecs
if (videoRef.current.duration >= timeSecs && Math.abs(delta) > 0.1) {
videoRef.current.currentTime = timeSecs
}
}