播放器点不了,不知道那出问题,怎么改

      
    
Page({
data: {
imgUrsl:[
'../images/1.jpg',
'../images/2.jpg',
'../images/3.jpg',
'../images/4.jpg',
'../images/5.jpg'
],
isPlayingMusic:false
},
bgm:null,
music_url:'http://......./xx.mp3',
music_coverImgUrl:'https://....../xx.jpg',
onReady: function () {
this.bgm=wx.getBackgroundAudioManager()
this.bgm.title=''
this.bgm.epname='123'
this.bgm.singer='singer'
this.bgm.coverImgUrl=this.music_coverImgUrl
this.bgm.onCanplay(()=>{
this.bgm.pause()
})
this.bgm.src=this.music_url
},
play:function(e){
if(this.data.isPlayingMusic){
this.bgm.pause()
}else{
this.bgm.play()
}
this.setData({
isPlayingMusic:!this.data.isPlayingMusic
})
},
})

img

img

可以看看这篇文章
https://developers.weixin.qq.com/community/develop/doc/000286025845e00f2c3d333ab56c00?commentid=000ae45613cf10e93a3d457735b0

我这边使用你的代码,把title赋予一个值就可以用了...

img


代码
https://developers.weixin.qq.com/s/jGyYX9mu7jDY