blob:http://形式
// 将二进制数据转换为Blob对象
const blob = new Blob([res.data], {
type: 'video/mp4'
});
// // 创建一个URL对象
this.videoUrl = URL.createObjectURL(blob)
:Base64形式
const blob = new Blob([res.data], { type: 'video/mp4' });
const reader = new FileReader();
reader.onloadend = () => {
this_.videoUrl = reader.result;
console.log(this_.videoUrl)
};
reader.readAsDataURL(blob);