Check if a Buffer/Uint8Array is a MP4 video
Install
$ npm install --save is-mp4
$ bower install --save is-mp4
$ component install deepak1556/is-mp4
Usage
Node.js
var readChunk = ; // npm install read-chunkvar isMP4 = ;var buffer = readChunk; ;//=> true
Browser
var xhr = ;xhr;xhrresponseType = 'arraybuffer'; xhr { ; //=> true}; xhr;
API
isMP4(buffer)
Accepts a Buffer (Node.js) or Uint8Array.
It only needs the first 8 bytes.