优化字幕插件

This commit is contained in:
Harvey Zack committed 2018-11-28 13:28:03 +08:00
1 parent 450e4ac879
commit 946a2da8a9
11 files changed
+51 -2120

No files matched your search

@@ -59,7 +59,7 @@ function settingMix(art) {
function artplayerPluginSubtitle(art) {
const { clamp } = art.constructor.utils;
const { setting, notice, refs, i18n } = art;
const { setting, notice, template, i18n } = art;
i18nMix(i18n);
setting.add(settingMix);
@@ -70,7 +70,7 @@ function artplayerPluginSubtitle(art) {
return {
set(value) {
const cues = Array.from(refs.$track.track.cues);
const cues = Array.from(template.$track.track.cues);
const time = clamp(value, -5, 5);
cues.forEach((cue, index) => {
if (!cuesCache[index]) {
+1 -1
View File
@@ -80,7 +80,7 @@ export default class Template {
if (removeHtml) {
this.$container.innerHTML = '';
} else {
this.refs.$player.classList.add('artplayer-destroy');
this.$player.classList.add('artplayer-destroy');
}
}
}