@@ -93,8 +93,7 @@ To analyze a file you only need to call ```MP4.analyze```. The first argument
9393must be a HTML5 [File](http:// developer.mozilla.org/en-US/docs/Web/API/File) or
9494[Blob](http:// developer.mozilla.org/en-US/docs/Web/API/Blob) object.
9595A [TypeError](http:// developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)
96- exception is thrown when ```blob``` does not inherit the ```Blob``` object
97- and when ```blob.type``` is not 'video/mp4', 'audio/mp4' or 'video/quicktime'.
96+ exception is thrown when ```blob``` does not inherit the ```Blob``` object.
9897The second argument is a completion callback. The analysis process is
9998asynchronous to avoid blocking the browser while waiting for disk I/O.
10099The argument passed to the callback is the result object.
@@ -106,6 +105,7 @@ The argument passed to the callback is the result object.
106105
107106```js
108107{
108+ error: Error (' error message' ), // null if no error occurred
109109 video: { // null if no video stream found
110110 codec: ' codec name'
111111 },
@@ -119,6 +119,9 @@ This is the structure of the result object passed to the callback.
119119As stated above, the analyzer currently extracts only the codec name
120120for the first video and audio streams. If no video or audio stream is found,
121121the concerning field in the result object is set to ``` null ``` .
122+ If an error occured, the ``` error ``` property contains an
123+ [ Error] ( http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error )
124+ object.
122125
123126``` result.video.codec ``` contains a FOURCC code. You can find a FOURCC list
124127[ there] ( http://www.fourcc.org/codecs.php ) .
0 commit comments