aboutsummaryrefslogtreecommitdiff
path: root/src/components/flash
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/flash')
-rw-r--r--src/components/flash/flash.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/components/flash/flash.js b/src/components/flash/flash.js
index f768ead8..e707a4c4 100644
--- a/src/components/flash/flash.js
+++ b/src/components/flash/flash.js
@@ -1,14 +1,15 @@
+import RuffleService from '../../services/ruffle_service/ruffle_service.js'
+
const Flash = {
- props: [
- 'src'
- ],
- created: function () {
+ props: [ 'src' ],
+ created () {
this.$nextTick(function () {
- const ruffle = window.RufflePlayer.newest()
- const player = ruffle.createPlayer()
- const container = this.$refs.cunt
- container.appendChild(player)
- player.load(this.src)
+ RuffleService.getRuffle().then((ruffle) => {
+ const player = ruffle.newest().createPlayer()
+ const container = this.$refs.cunt
+ container.appendChild(player)
+ player.load(this.src)
+ })
})
}
}