支持获取aplayer

This commit is contained in:
mjsoftware 2024-12-21 09:22:14 +08:00
parent bdcb309fed
commit 0963144853

View File

@ -144,7 +144,12 @@ document.addEventListener('DOMContentLoaded', () => {
this.aplayer = new APlayer(this.options) this.aplayer = new APlayer(this.options)
resolve() resolve()
}) })
.catch((e) => {}) .catch((e) => {
})
}
getAPlayer() {
return this.aplayer
} }
disconnectedCallback() { disconnectedCallback() {
@ -447,6 +452,7 @@ document.addEventListener('DOMContentLoaded', () => {
this.render() this.render()
} }
} }
render() { render() {
this.options = { this.options = {
captions: this.hasAttribute('captions') && this.getAttribute('captions') !== 'false', captions: this.hasAttribute('captions') && this.getAttribute('captions') !== 'false',