Check if a Buffer/Uint8Array is a WEBM video
npm install is-webm

> Check if a Buffer/Uint8Array is a WEBM video.
``sh`
$ npm install --save is-webm
`js
var readChunk = require('read-chunk'); // npm install read-chunk
var isWebm = require('is-webm');
var buffer = readChunk.sync('unicorn.webm', 0, 4);
isWebm(buffer);
//=> true
`
`js
var xhr = new XMLHttpRequest();
xhr.open('GET', 'unicorn.webm');
xhr.responseType = 'arraybuffer';
xhr.onload = function () {
isWebm(new Uint8Array(this.response));
//=> true
};
xhr.send();
``
Accepts a Buffer (Node.js) or Uint8Array.
It only needs the first 4 bytes.
MIT © t1st3