{"_id":"is-mp4","_rev":"40271","name":"is-mp4","description":"Check if a Buffer/Uint8Array is a MP4 video","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"deepak_robo","email":"hop2deep@gmail.com"}],"time":{"modified":"2021-06-03T10:12:03.000Z","created":"2014-05-07T15:35:35.670Z","0.1.0":"2014-05-07T15:35:35.670Z"},"users":{},"author":{"name":"Robo","email":"hop2deep@gmail.com"},"repository":{"type":"git","url":"git://github.com/deepak1556/is-mp4"},"versions":{"0.1.0":{"name":"is-mp4","version":"0.1.0","description":"Check if a Buffer/Uint8Array is a MP4 video","license":"MIT","repository":{"type":"git","url":"git://github.com/deepak1556/is-mp4"},"author":{"name":"Robo","email":"hop2deep@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["mp4","graphics","video","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"browserify":"^3.0.0","mocha":"*","read-chunk":"^0.1.0"},"bugs":{"url":"https://github.com/deepak1556/is-mp4/issues"},"homepage":"https://github.com/deepak1556/is-mp4","_id":"is-mp4@0.1.0","dist":{"shasum":"7a3c338ed93b9f7d4218345f3f18a2a7c5478eae","size":1093,"noattachment":false,"key":"/is-mp4/-/is-mp4-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-mp4/download/is-mp4-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"deepak_robo","email":"hop2deep@gmail.com"},"maintainers":[{"name":"deepak_robo","email":"hop2deep@gmail.com"}],"directories":{},"publish_time":1399476935670,"_cnpm_publish_time":1399476935670,"_hasShrinkwrap":false}},"readme":"# is-mp4 [![Build Status](https://travis-ci.org/deepak1556/is-mp4.svg?branch=master)](https://travis-ci.org/deepak1556/is-mp4)\r\n\r\n> Check if a Buffer/Uint8Array is a [MP4](http://en.wikipedia.org/wiki/MPEG-4_Part_14) video\r\n\r\n\r\n## Install\r\n\r\n```sh\r\n$ npm install --save is-mp4\r\n```\r\n\r\n```sh\r\n$ bower install --save is-mp4\r\n```\r\n\r\n```sh\r\n$ component install deepak1556/is-mp4\r\n```\r\n\r\n\r\n## Usage\r\n\r\n##### Node.js\r\n\r\n```js\r\nvar readChunk = require('read-chunk'); // npm install read-chunk\r\nvar isMP4 = require('is-mp4');\r\nvar buffer = readChunk.sync('bigbuckbunny.mp4', 0, 8);\r\n\r\nisMP4(buffer);\r\n//=> true\r\n```\r\n\r\n##### Browser\r\n\r\n```js\r\nvar xhr = new XMLHttpRequest();\r\nxhr.open('GET', 'bigbuckbunny.mp4');\r\nxhr.responseType = 'arraybuffer';\r\n\r\nxhr.onload = function () {\r\n\tisMP4(new Uint8Array(this.response));\r\n\t//=> true\r\n};\r\n\r\nxhr.send();\r\n```\r\n\r\n\r\n## API\r\n\r\n### isMP4(buffer)\r\n\r\nAccepts a Buffer (Node.js) or Uint8Array.\r\n\r\nIt only needs the first 8 bytes.\r\n","_attachments":{},"homepage":"https://github.com/deepak1556/is-mp4","bugs":{"url":"https://github.com/deepak1556/is-mp4/issues"},"license":"MIT"}