mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-09 13:29:37 +00:00
Update:Cleanup socket usage & add func for emitting events to admin users
This commit is contained in:
parent
e2af33e136
commit
180293ebc1
7 changed files with 90 additions and 105 deletions
|
|
@ -342,6 +342,7 @@ export default {
|
|||
this.$root.socket = this.socket
|
||||
console.log('Socket initialized')
|
||||
|
||||
// Pre-defined socket events
|
||||
this.socket.on('connect', this.connect)
|
||||
this.socket.on('connect_error', this.connectError)
|
||||
this.socket.on('disconnect', this.disconnect)
|
||||
|
|
@ -350,6 +351,7 @@ export default {
|
|||
this.socket.io.on('reconnect_error', this.reconnectError)
|
||||
this.socket.io.on('reconnect_failed', this.reconnectFailed)
|
||||
|
||||
// Event received after authorizing socket
|
||||
this.socket.on('init', this.init)
|
||||
|
||||
// Stream Listeners
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue