Merge pull request #1243 from luusl/enhance_websocket

Improve the websocket to send events to clients immediately.
This commit is contained in:
Christian Meffert
2021-05-19 20:32:08 +02:00
committed by GitHub
2 changed files with 165 additions and 67 deletions

View File

@@ -127,7 +127,7 @@ export default {
socket.onopen = function () {
vm.$store.dispatch('add_notification', { text: 'Connection to server established', type: 'primary', topic: 'connection', timeout: 2000 })
vm.reconnect_attempts = 0
socket.send(JSON.stringify({ notify: ['update', 'database', 'player', 'options', 'outputs', 'volume', 'spotify', 'lastfm', 'pairing'] }))
socket.send(JSON.stringify({ notify: ['update', 'database', 'player', 'options', 'outputs', 'volume', 'queue', 'spotify', 'lastfm', 'pairing'] }))
vm.update_outputs()
vm.update_player_status()