implement playing with howler

This commit is contained in:
Jonas Heinrich 2020-10-17 20:17:24 +02:00
parent 355073fc91
commit d100c5d9a4

View File

@ -18,6 +18,7 @@ import Breadcrumbs from '@nextcloud/vue/dist/Components/Breadcrumbs'
import Breadcrumb from '@nextcloud/vue/dist/Components/Breadcrumb' import Breadcrumb from '@nextcloud/vue/dist/Components/Breadcrumb'
import Navigation from './Navigation' import Navigation from './Navigation'
import Table from './Table' import Table from './Table'
import { Howl } from 'howler'
export default { export default {
name: 'Main', name: 'Main',
@ -36,8 +37,15 @@ export default {
mounted() { mounted() {
this.loadStations() this.loadStations()
this.scroll() this.scroll()
this.play()
}, },
methods: { methods: {
play() {
const sound = new Howl({
src: ['http://stream.srg-ssr.ch/m/drsvirus/mp3_128'],
})
sound.play()
},
loadStations() { loadStations() {
const vm = this const vm = this
this.$jquery.ajax({ this.$jquery.ajax({