artplayer@4.6.2

This commit is contained in:
Harvey Zack committed 2023-01-26 15:28:49 +08:00
1 parent 1d56947e16
commit 43fda18f18
139 files changed
+1658 -1630

No files matched your search

+1
View File
@@ -182,6 +182,7 @@ export default class Artplayer extends Emitter {
url: '',
type: '',
style: {},
escape: true,
encoding: 'utf-8',
},
moreVideoAttr: {
+1
View File
@@ -111,6 +111,7 @@ export default {
url: s,
type: s,
style: o,
escape: b,
encoding: s,
},
moreVideoAttr: o,
+8 -4
View File
@@ -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);
}
}