From bc01d5cffa11d8938c4d2dc700ddd8575c5072ff Mon Sep 17 00:00:00 2001 From: Mihai Alexandru <77043862+MAJigsaw77@users.noreply.github.com> Date: Thu, 12 Jun 2025 00:41:01 +0300 Subject: [PATCH] fix: audio desync when restarting a video cutscene. --- source/funkin/play/cutscene/VideoCutscene.hx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/source/funkin/play/cutscene/VideoCutscene.hx b/source/funkin/play/cutscene/VideoCutscene.hx index 2cea5a53a..0b32307b4 100644 --- a/source/funkin/play/cutscene/VideoCutscene.hx +++ b/source/funkin/play/cutscene/VideoCutscene.hx @@ -171,7 +171,7 @@ class VideoCutscene } #end - public static function restartVideo(resume:Bool = true):Void + public static function restartVideo():Void { #if html5 if (vid != null) @@ -184,14 +184,8 @@ class VideoCutscene #if hxvlc if (vid != null) { - // Seek to the start of the video. - vid.bitmap.time = 0; - if (resume) - { - // Resume the video if it was paused. - vid.resume(); - } - + vid.stop(); + vid.play(); onVideoRestarted.dispatch(); } #end