BackgroundAudioManager:某些安卓设备无法播放机型为mate30 5G,小米9?
发布于 3 年前 作者 olai 14806 次浏览 来自 官方Issues
 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})
1 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),并详细描述下复现的流程。

回到顶部