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
@@ -25,6 +25,7 @@ export default class Subtitle extends Component {
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);