收藏
回答

音频iso获取时长duration为0?

myaudio.src = "https://hmj-api.tapfun.cc/file/downloadFileMedia/d1928912-9b0d-4b6c-9328-ae7183246c12.mp3";
that.duration=that.formatSeconds(res.data.audioDuration);
myaudio.onTimeUpdate(function(){
  setTimeout(() => {
    let durationnum = parseInt(myaudio.duration);
    let time = that.formatSeconds(myaudio.duration);
    that.duration = time;
    that.durationNum = durationnum;
  });
  that.changeCurrent(myaudio.currentTime)
})


回答关注问题邀请回答
收藏

1 个回答

  • 今天天气很好
    今天天气很好
    10-10

    先写个myaudio.onPlay(function callback),再用myaudio.onTimeUpdate(function callback)

    10-10
    有用
    回复 1
登录 后发表内容
问题标签