remove bilingual

This commit is contained in:
Harvey committed 2022-03-10 09:48:32 +08:00
1 parent 5defc28505
commit b4500e701f
63 files changed
+362 -335

No files matched your search

-1
View File
@@ -160,7 +160,6 @@ export default class Artplayer extends Emitter {
type: '',
style: {},
encoding: 'utf-8',
bilingual: false,
},
moreVideoAttr: {
controls: false,
-1
View File
@@ -100,7 +100,6 @@ export default {
type: s,
style: o,
encoding: s,
bilingual: b,
},
moreVideoAttr: o,
icons: o,
@@ -20,13 +20,6 @@
}
}
.art-bilingual {
p:nth-child(n + 2) {
transform: scale(0.6);
transform-origin: center top;
}
}
&.art-subtitle-show {
.art-subtitle {
display: block;
+1 -28
View File
@@ -1,16 +1,4 @@
import {
setStyle,
setStyles,
srtToVtt,
vttToBlob,
getExt,
assToVtt,
addClass,
escape,
removeClass,
hasClass,
errorHandle,
} from './utils';
import { setStyle, setStyles, srtToVtt, vttToBlob, getExt, assToVtt, escape, errorHandle } from './utils';
import Component from './utils/component';
import validator from 'option-validator';
import scheme from './scheme';
@@ -42,20 +30,6 @@ export default class Subtitle extends Component {
return this.textTrack.activeCues[0];
}
get bilingual() {
const { $subtitle } = this.art.template;
return hasClass($subtitle, 'art-bilingual');
}
set bilingual(val) {
const { $subtitle } = this.art.template;
if (val) {
addClass($subtitle, 'art-bilingual');
} else {
removeClass($subtitle, 'art-bilingual');
}
}
style(key, value) {
const { $subtitle } = this.art.template;
if (typeof key === 'object') {
@@ -107,7 +81,6 @@ export default class Subtitle extends Component {
}
this.style(subtitleOption.style);
this.bilingual = subtitleOption.bilingual;
errorHandle(window.fetch, 'fetch not support');
return fetch(subtitleOption.url)