mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 04:01:20 -08:00
build all packages
This commit is contained in:
1 parent
d4600fbd95
commit
699ffece96
9 files changed
+42
-17
No files matched your search
@@ -21,7 +21,7 @@
|
||||
}
|
||||
|
||||
.art-bilingual {
|
||||
p:nth-child(2) {
|
||||
p:nth-child(n+2) {
|
||||
font-size: 0.6em;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
import { setStyle, setStyles, srtToVtt, vttToBlob, getExt, assToVtt, addClass, escape } from './utils';
|
||||
import {
|
||||
setStyle,
|
||||
setStyles,
|
||||
srtToVtt,
|
||||
vttToBlob,
|
||||
getExt,
|
||||
assToVtt,
|
||||
addClass,
|
||||
escape,
|
||||
removeClass,
|
||||
hasClass,
|
||||
} from './utils';
|
||||
import Component from './utils/component';
|
||||
|
||||
export default class Subtitle extends Component {
|
||||
@@ -35,6 +46,20 @@ 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') {
|
||||
|
||||
Reference in new issue
Block a user