mirror of
https://github.com/ragestudio/comty.git
synced 2025-07-01 13:24:16 +00:00
Adjust video sync timing calculation for improved accuracy
This commit is contained in:
parent
e90ecf27ac
commit
0f62d673f2
@ -42,9 +42,13 @@ const LyricsVideo = React.forwardRef((props, videoRef) => {
|
||||
const currentTrackTime = window.app.cores.player.controls.seek()
|
||||
setSyncingVideo(true)
|
||||
|
||||
let newTime =
|
||||
currentTrackTime + lyrics.video_starts_at_ms / 1000 + 150 / 1000
|
||||
newTime -= 5 / 1000
|
||||
let newTime = currentTrackTime + lyrics.video_starts_at_ms / 1000
|
||||
|
||||
// dec some ms to ensure the video seeks correctly
|
||||
newTime -= 10 / 1000
|
||||
|
||||
// sum the audio gradual time fade
|
||||
newTime = newTime + 150 / 1000
|
||||
|
||||
videoRef.current.currentTime = newTime
|
||||
}, [lyrics, videoRef, setSyncingVideo])
|
||||
|
Loading…
x
Reference in New Issue
Block a user