mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
artplayer@4.6.2
This commit is contained in:
1 parent
1d56947e16
commit
43fda18f18
139 files changed
+1658
-1630
No files matched your search
@@ -61,10 +61,14 @@ export default class Subtitle extends Component {
|
||||
const { $subtitle } = this.art.template;
|
||||
$subtitle.innerHTML = '';
|
||||
if (this.activeCue) {
|
||||
$subtitle.innerHTML = this.activeCue.text
|
||||
.split(/\r?\n/)
|
||||
.map((item) => `<p>${escape(item)}</p>`)
|
||||
.join('');
|
||||
if (this.art.option.subtitle.escape) {
|
||||
$subtitle.innerHTML = this.activeCue.text
|
||||
.split(/\r?\n/)
|
||||
.map((item) => `<p>${escape(item)}</p>`)
|
||||
.join('');
|
||||
} else {
|
||||
$subtitle.innerHTML = this.activeCue.text;
|
||||
}
|
||||
this.art.emit('subtitleUpdate', this.activeCue.text);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user