forked from platypush/platypush
[media UI] Added loading spin overlay upon play.
This commit is contained in:
parent
9e5728f8ba
commit
b491f81cda
1 changed files with 17 additions and 4 deletions
|
@ -195,15 +195,28 @@ export default {
|
|||
async play(item) {
|
||||
if (item?.type === 'torrent') {
|
||||
this.awaitingPlayTorrent = item.url
|
||||
this.notify({
|
||||
text: 'Torrent queued for download',
|
||||
image: {
|
||||
iconClass: 'fa fa-magnet',
|
||||
}
|
||||
})
|
||||
|
||||
await this.download(item)
|
||||
return
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
|
||||
try {
|
||||
if (!this.selectedPlayer.component.supports(item))
|
||||
item = await this.startStreaming(item, this.pluginName)
|
||||
|
||||
await this.selectedPlayer.component.play(item, this.selectedSubtitles, this.selectedPlayer)
|
||||
await this.refresh()
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async pause() {
|
||||
|
|
Loading…
Reference in a new issue