mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-08 03:32:43 +02:00
Fix:Stream container not opening on mount
This commit is contained in:
@@ -85,12 +85,24 @@ export default {
|
||||
reconnectFailed() {
|
||||
console.error('[SOCKET] reconnect failed')
|
||||
},
|
||||
init(payload) {
|
||||
init(payload, count = 0) {
|
||||
if (!this.$refs.streamContainer) {
|
||||
if (count > 20) {
|
||||
console.error('Stream container never mounted')
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.init(payload, ++count)
|
||||
}, 100)
|
||||
return
|
||||
}
|
||||
console.log('Init Payload', payload)
|
||||
if (payload.stream) {
|
||||
if (this.$refs.streamContainer) {
|
||||
this.$store.commit('setStream', payload.stream)
|
||||
this.$refs.streamContainer.streamOpen(payload.stream)
|
||||
} else {
|
||||
console.warn('Stream Container not mounted')
|
||||
}
|
||||
}
|
||||
if (payload.user) {
|
||||
|
||||
Reference in New Issue
Block a user