Fix #1041: Support autoplay when loading embed frame from Mastodon and third-party websites
This commit is contained in:
parent
40720328d7
commit
a44e7c607b
|
@ -0,0 +1 @@
|
||||||
|
Support autoplay when loading embed frame from Mastodon and third-party websites (#1041)
|
|
@ -145,6 +145,7 @@ export default {
|
||||||
type: null,
|
type: null,
|
||||||
id: null,
|
id: null,
|
||||||
tracks: [],
|
tracks: [],
|
||||||
|
autoplay: false,
|
||||||
url: null,
|
url: null,
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
|
@ -174,6 +175,8 @@ export default {
|
||||||
if (!!params.instance) {
|
if (!!params.instance) {
|
||||||
this.baseUrl = params.instance
|
this.baseUrl = params.instance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.autoplay = params.autoplay != undefined || params.auto_play != undefined
|
||||||
this.fetch(this.type, this.id)
|
this.fetch(this.type, this.id)
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
@ -380,6 +383,9 @@ export default {
|
||||||
},
|
},
|
||||||
tracks () {
|
tracks () {
|
||||||
this.currentIndex = 0
|
this.currentIndex = 0
|
||||||
|
if (this.autoplay) {
|
||||||
|
this.play(this.currentIndex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue