is-ogg
Check if a Buffer/Uint8Array is an OGG file.
Install
$ npm install --save is-ogg
$ bower install --save is-ogg
$ component install hemanth/is-ogg
Usage
Node.js
var readChunk = ; // npm install read-chunkvar isOgg = ;var buffer = ; ;//=> true
Browser
var xhr = ;xhr;xhrresponseType = 'arraybuffer'; xhr { ; //=> true}; xhr;
API
isOgg(buffer)
Accepts a Buffer (Node.js) or Uint8Array.
It only needs the first 4 bytes.
License
MIT © Hemanth.HM