diff --git a/pages/API/get-background-audio-manager/get-background-audio-manager.uvue b/pages/API/get-background-audio-manager/get-background-audio-manager.uvue index 5ceb76dbe2f12d3656e3837a7e75335eb8dfec18..46d726cab801c04af12f093573cfedb737ff2a9a 100644 --- a/pages/API/get-background-audio-manager/get-background-audio-manager.uvue +++ b/pages/API/get-background-audio-manager/get-background-audio-manager.uvue @@ -2,7 +2,7 @@ - 注意:离开当前页面后背景音乐将保持播放,但退出uni-app将停止 + 注意:离开当前页面后背景音乐将保持播放 @@ -38,8 +38,7 @@ onLoad: function () { let bgAudioMannager = uni.getBackgroundAudioManager(); bgAudioMannager.title = '致爱丽丝'; - bgAudioMannager.epname = '致爱丽丝' - bgAudioMannager.singer = '暂无'; + bgAudioMannager.singer = '路德维希·范·贝多芬'; bgAudioMannager.coverImgUrl = 'https://web-assets.dcloud.net.cn/unidoc/zh/Alice.jpeg'; bgAudioMannager.onPlay(() => { @@ -52,14 +51,12 @@ }) bgAudioMannager.onEnded(() => { this.playing = false; - // this.playTime = this.playTime = 0; - // thi.formatedPlayTime = this.formatedPlayTime }) bgAudioMannager.onNext(() => { console.log("下一曲"); this.bgAudioMannager?.stop() bgAudioMannager.title = '致爱丽丝' + this.count++; - bgAudioMannager.singer = '暂无2' + this.count++; + bgAudioMannager.singer = '路德维希·范·贝多芬'; bgAudioMannager.coverImgUrl = 'https://web-assets.dcloud.net.cn/unidoc/zh/Alice.jpeg'; this.bgAudioMannager!.src = this.dataUrl; this.bgAudioMannager?.play() @@ -68,17 +65,10 @@ console.log("上一曲"); this.bgAudioMannager?.stop() bgAudioMannager.title = '致爱丽丝' + this.count--; - bgAudioMannager.singer = '暂无' + this.count--; + bgAudioMannager.singer = '路德维希·范·贝多芬'; this.bgAudioMannager!.src = this.dataUrl; this.bgAudioMannager?.play() }) - // bgAudioMannager.onTimeUpdate((e) => { - // if (Math.floor(bgAudioMannager.currentTime) > Math.floor(this.playTime)) { - // this.$backgroundAudioData.formatedPlayTime = this.formatedPlayTime = util.formatTime(Math.floor(bgAudioMannager.currentTime)); - // } - // this.$backgroundAudioData.playTime = this.playTime = bgAudioMannager.currentTime; - // }) - this.bgAudioMannager = bgAudioMannager; }, methods: { @@ -143,4 +133,4 @@ flex-direction: row; justify-content: center; } - \ No newline at end of file + diff --git a/static/stop.png b/static/stop.png new file mode 100644 index 0000000000000000000000000000000000000000..9e65f3e8cf2c9e7f2a4707d1d0c51b0214daadf2 Binary files /dev/null and b/static/stop.png differ