收藏
回答

BackgroundAudioManager:某些安卓设备无法播放机型为mate30 5G,小米9?

 const backgroundAudioManager = wx.getBackgroundAudioManager()
   
    backgroundAudioManager.title = '此时此刻'
    backgroundAudioManager.epname = '此时此刻'
    backgroundAudioManager.singer = '许巍'
    backgroundAudioManager.coverImgUrl = 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000'
    // 设置了 src 之后会自动播放
    backgroundAudioManager.src = 'https://alioss.app-link.org/alucard263096/wealth/zaobao/c23dedbd8f1303e99aa379a5af67fadd_210112182551_1358465460.mp3'
    
    var that = this;
    backgroundAudioManager.onTimeUpdate(()=>{
     
    })
    backgroundAudioManager.onError((res)=>{
     
      that.setData({error:res})
    })
    backgroundAudioManager.play();
    console.log(backgroundAudioManager,'ssss');
    this.setData({backgroundAudioManager})
回答关注问题邀请回答
收藏
登录 后发表内容
问题标签