Skip to content

Commit

Permalink
Add list of load error codes from the spec to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
goldfire committed Jun 20, 2021
1 parent fcbe3e1 commit 94b617c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ new Howl({
Fires when the sound is loaded.
#### onloaderror `Function`
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.

The load error codes are [defined in the spec](https://dev.w3.org/html5/spec-author-view/spec.html#mediaerror):
**1** - The fetching process for the media resource was aborted by the user agent at the user's request.
**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.
**3** - An error of some description occured while decoding the media resource, after the resource was established to be usable.
**4** - The media resource indicated by the src attribute or assigned media provider object was not suitable.
#### onplayerror `Function`
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.
#### onplay `Function`
Expand Down

0 comments on commit 94b617c

Please sign in to comment.