Skip to content

Commit 5cdebc3

Browse files
committed
Update README.md
1 parent ad08cc7 commit 5cdebc3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ To analyze a file you only need to call ```MP4.analyze```. The first argument
9393
must 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.
9595
A [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.
9897
The second argument is a completion callback. The analysis process is
9998
asynchronous to avoid blocking the browser while waiting for disk I/O.
10099
The 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.
119119
As stated above, the analyzer currently extracts only the codec name
120120
for the first video and audio streams. If no video or audio stream is found,
121121
the 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

Comments
 (0)