From d100c5d9a4a337a242b8df69d58bbc3822f7cace Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 17 Oct 2020 20:17:24 +0200 Subject: [PATCH] implement playing with howler --- src/components/Main.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Main.vue b/src/components/Main.vue index 7c5ef64..2f4bb14 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -18,6 +18,7 @@ import Breadcrumbs from '@nextcloud/vue/dist/Components/Breadcrumbs' import Breadcrumb from '@nextcloud/vue/dist/Components/Breadcrumb' import Navigation from './Navigation' import Table from './Table' +import { Howl } from 'howler' export default { name: 'Main', @@ -36,8 +37,15 @@ export default { mounted() { this.loadStations() this.scroll() + this.play() }, methods: { + play() { + const sound = new Howl({ + src: ['http://stream.srg-ssr.ch/m/drsvirus/mp3_128'], + }) + sound.play() + }, loadStations() { const vm = this this.$jquery.ajax({