This Project use CriDemuxerCore and blazor to demux usm file online
bin/Release/net5.0/wwwroot/_framework
waiting
add this to your head
<script src="https://github.com/mizuka-wu/CriDemuxWasm/raw/master/${pathToDir}/_framework/blazor.webassembly.js"></script>
add this function
/**
* @returns {Promise<string[]>} result
*/
function getDemuxFiles(file) {
if (file) {
const filePath = `./${file.name}`
const fileRreader = new FileReader()
return new Promise(resolve => {
fileRreader.onload = () => {
window.FS.writeFile(filePath, new Uint8Array(fileRreader.result))
resolve(DotNet.invokeMethodAsync("CriDemuxer", "Demux", filePath))
}
fileRreader.readAsArrayBuffer(file)
})
} else {
throw new Error("no file")
}
}
Call this function will return the demuxed files(video: m2v, audio: adx/aix/ac3) from your uploaded file
and you can read them by use window.FS.readFile(filePath) => UINT8ARRAY
Please read the wwwroot/index.html
and run start.sh