audio在安卓机上有声音,在ios上没有声音?
发布于 7 年前 作者 mzeng 640 次浏览 来自 问答
onLoad: function () {
    var that = this;
    that.audioCtx = wx.createAudioContext('myAudio');
    wx.downloadFile({
      url: that.data.mysite + '/data/step_stand.mp3',
      success: function (res) {
        that.audioCtx.setSrc(res.tempFilePath);
        that.audioCtx.play();
        setTimeout(function () {
          wx.downloadFile({
            url: that.data.mysite + '/data/step_walk.mp3',
            success: function (res) {
              that.audioCtx.setSrc(res.tempFilePath);
              that.audioCtx.play();
              setTimeout(function(){
                that.startBtn();
                setTimeout(that.autofinish, 10000);
              },4000)
            }
          })
        }, 6000);
         
      }
    })
    that.onTimeChange();
     
    
  },
回到顶部