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

This commit is contained in:
nick-delirium 2024-02-20 14:12:38 +01:00
parent 75383e6d50
commit 7ce43ef412
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

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
}
}