mounted () {
let taht
= this
taht
.$conn
.listen({
onAudioMessage
: function (message
) {
if (message
.url
) {
var options
= {
url
: message
.url
,
headers
: {
'Accept': 'audio/mp3'
}
};
options
.onFileDownloadComplete = function ( response
) {
var objectURL
= WebIM
.utils
.parseDownloadResponse
.call(taht
.$conn
, response
);
};
options
.onFileDownloadError = function () {
console
.log("失败")
};
WebIM
.utils
.download
.call(taht
.$conn
, options
);
}
},
})
转载请注明原文地址:https://tech.qufami.com/read-13543.html