Skip to content

Commit 94b617c

Browse files
committed
Add list of load error codes from the spec to docs
Fixes #1370
1 parent fcbe3e1 commit 94b617c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@ new Howl({
256256
Fires when the sound is loaded.
257257
#### onloaderror `Function`
258258
Fires when the sound is unable to load. The first parameter is the ID of the sound (if it exists) and the second is the error message/code.
259+
260+
The load error codes are [defined in the spec](http://dev.w3.org/html5/spec-author-view/spec.html#mediaerror):
261+
**1** - The fetching process for the media resource was aborted by the user agent at the user's request.
262+
**2** - A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable.
263+
**3** - An error of some description occured while decoding the media resource, after the resource was established to be usable.
264+
**4** - The media resource indicated by the src attribute or assigned media provider object was not suitable.
259265
#### onplayerror `Function`
260266
Fires when the sound is unable to play. The first parameter is the ID of the sound and the second is the error message/code.
261267
#### onplay `Function`

0 commit comments

Comments
 (0)