Update:Show loading indicator on play buttons when starting playback

This commit is contained in:
advplyr
2023-12-15 17:35:37 -06:00
parent efc6d68403
commit e1c02ce74c
14 changed files with 172 additions and 33 deletions
-3
View File
@@ -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
+6
View File
@@ -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) {