subs fix pause

This commit is contained in:
2026-04-15 21:49:25 -07:00
parent 0cb2a7739a
commit ea3d92974b

View File

@@ -22,13 +22,14 @@
let isSyncing = false;
let syncTimeout: ReturnType<typeof setTimeout> | undefined;
let jassubInstance: any | undefined;
let currentSubtitleUrl = $derived(videoState?.subtitleUrl);
$effect(() => {
console.log("effect-1");
if (videoElement && videoState?.subtitleUrl && videoState.subtitleUrl.endsWith(".ass")) {
if (videoElement && currentSubtitleUrl && currentSubtitleUrl.endsWith(".ass")) {
jassubInstance = new JASSUB({
video: videoElement,
subUrl: videoState.subtitleUrl,
subUrl: currentSubtitleUrl,
fonts: [font1],
});