<el-upload
              class="upload-demo"
              ref="vidos"
              :action="URL+'/api/post/file'"
              :data="date"
              :on-success="handleAvatarAUDIO"
              :before-upload="beforeAvatarAUDIO" //将用到此方法
              :on-progress="beforeAvatarUpload"
              accept=".mp4"
              :auto-upload="vidoauto"
              :on-change="AvatarAUDIO"
              :file-list="fileList"
            >
beforeAvatarAUDIO(file){
  let url = URL.createObjectURL(file)
var audioElement = new Audio(url)
audioElement.addEventListener('loadedmetadata',function(){
    let playTime = audioElement.duration; //playTime就是当前视频长度
})
}

相关文章:

  • 2021-09-04
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2021-06-15
相关资源
相似解决方案