video 播放base64 流
function dataURLtoFile(dataurl, filename) {
let arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1]
let bstr = atob(arr[1])
console.log(bstr)
return bstr
}
dataURLtoFile('data:video/mp4;base64,aHR0cHM6Ly8xMjUyMjQ0MzEwLnZvZDIubXlxY2xvdWQuY29tLzkwODk2NzFmdm9kdHJhbnNnenAxMjUyMjQ0MzEwLzJmYTg0OGFjNTI4NTg5MDgwOTc4NDIxMDA0Ny92LmYxMDAwMzAubXA0')
调用函数直接得到 src
越努力越幸运