diff --git a/src/renderer/layouts/PlayerBar.vue b/src/renderer/layouts/PlayerBar.vue index 977f276..3883973 100644 --- a/src/renderer/layouts/PlayerBar.vue +++ b/src/renderer/layouts/PlayerBar.vue @@ -65,6 +65,9 @@ export default { mounted () { this.drawVisualizer() }, + updated () { + this.wavesurfer.load(this.playerQueue[this.currentlyPlaying].stream) + }, methods: { drawVisualizer () { let progress = this.$el.getElementsByClassName('progress')[0] @@ -169,11 +172,9 @@ export default { }, playNext () { this.playQueueItem(this.currentlyPlaying + 1) - this.wavesurfer.load(this.playerQueue[this.currentlyPlaying].stream) }, playPrevious () { this.playQueueItem(this.currentlyPlaying - 1) - this.wavesurfer.load(this.playerQueue[this.currentlyPlaying].stream) }, play () { this.wavesurfer.play() diff --git a/src/renderer/store/modules/Player.js b/src/renderer/store/modules/Player.js index 9ee4184..8a87437 100644 --- a/src/renderer/store/modules/Player.js +++ b/src/renderer/store/modules/Player.js @@ -20,8 +20,8 @@ const state = { id: 8, title: 'Ali sorena', artist: 'Negar', - artwork: 'http://sakhamusic.ir/wp-content/uploads/2016/03/Ali-Sorena-%E2%80%93-Negar.jpg', - stream: 'http://dl.sakhamusic.ir/94/esfand/09/03%20Negar%20(Prod.%20Ehsan%20Ziya)_2.mp3' + artwork: '/static/demo/negar.jpg', + stream: '/static/demo/negar.mp3' } ] } diff --git a/static/demo/negar.jpg b/static/demo/negar.jpg new file mode 100644 index 0000000..9cf715d Binary files /dev/null and b/static/demo/negar.jpg differ diff --git a/static/demo/negar.mp3 b/static/demo/negar.mp3 new file mode 100644 index 0000000..f0a6c26 Binary files /dev/null and b/static/demo/negar.mp3 differ