显示换源提示

This commit is contained in:
lyswhut
2021-04-25 10:29:08 +08:00
parent 920d696d0b
commit b6c1403f4b
2 changed files with 13 additions and 5 deletions
+8 -1
View File
@@ -609,7 +609,14 @@ export default {
// this.musicInfo.url = await getMusicUrl(targetSong, type)
this.status = this.statusText = this.$t('core.player.geting_url')
return this.getUrl({ musicInfo: targetSong, type, isRefresh }).then(url => {
return this.getUrl({
musicInfo: targetSong,
type,
isRefresh,
onToggleSource: () => {
this.status = this.statusText = 'Try toggle source...'
},
}).then(url => {
if (targetSong !== this.targetSong || this.isPlay) return
audio.src = this.musicInfo.url = url
}).catch(err => {