opt: Optimize subtitle processing logic
This commit is contained in:
@@ -59,6 +59,7 @@ export class BilingualSubtitleManager {
|
|||||||
destroy() {
|
destroy() {
|
||||||
logger.info("Bilingual Subtitle Manager: Destroying...");
|
logger.info("Bilingual Subtitle Manager: Destroying...");
|
||||||
this.#removeEventListeners();
|
this.#removeEventListeners();
|
||||||
|
this.#throttledTriggerTranslations?.cancel();
|
||||||
this.#captionWindowEl?.parentElement?.parentElement?.remove();
|
this.#captionWindowEl?.parentElement?.parentElement?.remove();
|
||||||
this.#formattedSubtitles = [];
|
this.#formattedSubtitles = [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user