mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-31 15:47:13 +02:00
Update:Show loading indicator on play buttons when starting playback
This commit is contained in:
@@ -110,9 +110,6 @@ export default {
|
||||
this.$router.replace('/localMedia/folders')
|
||||
}
|
||||
},
|
||||
play(mediaItem) {
|
||||
this.$eventBus.$emit('play-item', { libraryItemId: mediaItem.id })
|
||||
},
|
||||
async init() {
|
||||
var folder = await this.$db.getLocalFolder(this.folderId)
|
||||
this.folder = folder
|
||||
|
||||
@@ -232,6 +232,10 @@ export default {
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
playerIsStartingPlayback() {
|
||||
// Play has been pressed and waiting for native play response
|
||||
return this.$store.state.playerIsStartingPlayback
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -279,7 +283,9 @@ export default {
|
||||
this.showDialog = true
|
||||
},
|
||||
async play() {
|
||||
if (this.playerIsStartingPlayback) return
|
||||
await this.$hapticsImpact()
|
||||
this.$store.commit('setPlayerIsStartingPlayback', this.localLibraryItemId)
|
||||
this.$eventBus.$emit('play-item', { libraryItemId: this.localLibraryItemId })
|
||||
},
|
||||
getCapImageSrc(contentUrl) {
|
||||
|
||||
Reference in New Issue
Block a user