Fix:Socket reconnection on disconnect, Add:Connection indicator icon showing socket/cellular

This commit is contained in:
advplyr 2022-07-07 17:24:26 -05:00
parent e07e7f70d6
commit cb2aaede67
7 changed files with 95 additions and 21 deletions

View file

@ -154,9 +154,6 @@ export default {
// Only cancels stream if streamining not playing downloaded
this.$eventBus.$emit('close-stream')
},
socketConnectionUpdate(isConnected) {
console.log('Socket connection update', isConnected)
},
socketConnectionFailed(err) {
this.$toast.error('Socket connection error: ' + err.message)
},
@ -253,7 +250,6 @@ export default {
}
},
async mounted() {
this.$socket.on('connection-update', this.socketConnectionUpdate)
this.$socket.on('initialized', this.socketInit)
this.$socket.on('user_updated', this.userUpdated)
this.$socket.on('user_media_progress_updated', this.userMediaProgressUpdated)
@ -282,7 +278,6 @@ export default {
}
},
beforeDestroy() {
this.$socket.off('connection-update', this.socketConnectionUpdate)
this.$socket.off('initialized', this.socketInit)
this.$socket.off('user_updated', this.userUpdated)
this.$socket.off('user_media_progress_updated', this.userMediaProgressUpdated)