loadAudioInfo=(audioId)=>{
let _this = this
const url = api.getAudioPath(audioId)
const request = new window.XMLHttpRequest()
request.open('GET', url, true)
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
request.setRequestHeader("APPID", "huizhan")
request.setRequestHeader("X-Account-Info", JSON.stringify( {userId: Application.userInfo.userId} ))
request.responseType = 'arraybuffer'
request.onreadystatechange = function (res) {
if (request.readyState == 4 && request.status == 200) {
_this.setState({
conferenceAudioWav: 'data:audio/wavbase64,' + Buffer.from(request.response).toString('base64'),
})
}
}
request.onerror = (err) => {
}
request.send()
}
-----------------------------2、正常使用audio标签 src赋值------------------------------
jsdelivr怎么转换mp3,详细操作如下Freelrc、online-converter。操作步骤以嗨格式视频转换器为例:Step
选择音频转换功能模块。Step
点击选择文件找到需要转换格式的文件。Step
设定输出格式为MP3。Step
点击全部转换开始转换文件格式。