Improve the websocket to send events to clients immediately.

This commit is contained in:
martin
2021-05-13 22:54:11 +02:00
parent 520a1251ec
commit a15edfcae9
3 changed files with 107 additions and 77 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()