Verified Commit a44e7c60 authored by Agate's avatar Agate 💬

Fix #1041: Support autoplay when loading embed frame from Mastodon and third-party websites

parent 40720328
Pipeline #9889 passed with stages
in 5 minutes and 42 seconds
Support autoplay when loading embed frame from Mastodon and third-party websites (#1041)
......@@ -145,6 +145,7 @@ export default {
type: null,
id: null,
tracks: [],
autoplay: false,
url: null,
isLoading: true,
theme: 'dark',
......@@ -174,6 +175,8 @@ export default {
if (!!params.instance) {
this.baseUrl = params.instance
}
this.autoplay = params.autoplay != undefined || params.auto_play != undefined
this.fetch(this.type, this.id)
},
mounted () {
......@@ -380,6 +383,9 @@ export default {
},
tracks () {
this.currentIndex = 0
if (this.autoplay) {
this.play(this.currentIndex)
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment