webm-inspector
v1.0.1
Published
WebM demuxers.
Downloads
101
Readme
webm-inspector
Fork from https://www.npmjs.com/package/inspector.js 只导出webM的demuxer,修改了webpack的编译配置,不使用eval,会出警告。 生成了dts
Quick Start
The easiest way to start using webm-inspector in your own projects is installing it using npm:
- npm install webm-inspector
Once done, and integrated with your web app, you can start using it. Example:
var mediaSamplesUrl = 'https://video-dev.github.io/streams/x36xhzz/url_0/url_462/193039199_mp4_h264_aac_hd_7.ts';
var req = new XMLHttpRequest();
req.open('GET', mediaSamplesUrl, true);
req.responseType = 'arraybuffer';
req.onload = function (data) {
var arrayBuffer = req.response;
if (arrayBuffer) {
var byteArray = new Uint8Array(arrayBuffer);
var demuxer = inspectorjs.createWebMDemuxer();
demuxer.append(byteArray);
demuxer.end();
// You will find tracks information in demuxer.tracks
console.log(demuxer.tracks);
}