1、HTML
<audio ref="player" crossOrigin="anonymous" controls style="width:400px" controlsList="nodownload" />
// 隐藏录音控件
hidden
// 自动播放
autoplay
2、JavaScript
this.$refs.player.src = URL.createObjectURL(data)
data为返回的二进制音频流
3、参数意义
const audioPlayer = this.$refs.player
// 设置倍速
audioPlayer.playbackRate = this.speed
// 播放
audioPlayer.play()
// 暂停
audioPlayer.pause()
// 重播
audioPlayer.currentTime = 0