update subtitle.js

This commit is contained in:
Harvey committed 2022-09-07 16:54:01 +08:00
1 parent 8d057080f1
commit a5b035e031
3 files changed
+3 -1

No files matched your search

+1
View File
@@ -3732,6 +3732,7 @@ class Subtitle extends (0, _componentDefault.default) {
art.on("video:timeupdate", ()=>{
if (!this.url) return;
const state = this.art.template.$video.webkitDisplayingFullscreen;
if (typeof state !== "boolean") return;
if (state !== lastState) {
lastState = state;
this.createTrack(state ? "subtitles" : "metadata", this.url);