mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 20:26:16 -08:00
修复切换字幕bug
This commit is contained in:
1 parent
525bb269d9
commit
7de1939472
1 file changed
+11
-2
@@ -41,16 +41,25 @@ function settingMix(art) {
|
||||
$value.innerText = value;
|
||||
art.plugins.artplayerPluginSubtitle.set(Number(value));
|
||||
});
|
||||
|
||||
art.on('subtitle:switch', () => {
|
||||
$range.value = 0;
|
||||
$value.innerText = 0;
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function artplayerPluginSubtitle(art) {
|
||||
const { clamp } = art.constructor.utils;
|
||||
const { setting, notice, refs, i18n } = art;
|
||||
const cuesCache = [];
|
||||
let cuesCache = [];
|
||||
i18nMix(i18n);
|
||||
setting.add(settingMix);
|
||||
const { clamp } = art.constructor.utils;
|
||||
art.on('subtitle:switch', () => {
|
||||
cuesCache = [];
|
||||
});
|
||||
|
||||
return {
|
||||
set(value) {
|
||||
const cues = Array.from(refs.$track.track.cues);
|
||||
|
||||
Reference in new issue
Block a user