mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-27 00:08:51 +01:00
Fix:Stream container not opening on mount
This commit is contained in:
parent
d0d19ed1ad
commit
4778d09501
@ -145,7 +145,7 @@ export default {
|
||||
audioPlayerMounted() {
|
||||
this.audioPlayerReady = true
|
||||
if (this.stream) {
|
||||
console.log('[STREAM-CONTAINER] audioPlayerMounted w/ Stream', this.stream)
|
||||
console.log('[STREAM-CONTAINER] audioPlayer Mounted w/ Stream', this.stream)
|
||||
this.openStream()
|
||||
}
|
||||
},
|
||||
|
@ -74,7 +74,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
setEntity(_series) {
|
||||
console.log('setting entity', _series)
|
||||
this.series = _series
|
||||
},
|
||||
setSelectionMode(val) {
|
||||
|
@ -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) {
|
||||
|
@ -118,7 +118,7 @@ module.exports = {
|
||||
userAudiobook: user.getAudiobookJSON(book.id),
|
||||
book
|
||||
}
|
||||
})
|
||||
}).filter(b => !!b.userAudiobook)
|
||||
},
|
||||
|
||||
getBooksMostRecentlyRead(booksWithUserAb, limit, minified = false) {
|
||||
|
Loading…
Reference in New Issue
Block a user