webm-inspector
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Travis CI Status: Travis CI Status

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);
}

Readme

Keywords

none

Package Sidebar

Install

npm i webm-inspector

Weekly Downloads

20

Version

1.0.1

License

ISC

Unpacked Size

92.2 kB

Total Files

71

Last publish

Collaborators

  • weibangxin