From 94b617c054343979b1db3cddb4316ae4d16f3db1 Mon Sep 17 00:00:00 2001 From: James Simpson Date: Sun, 20 Jun 2021 14:47:56 -0500 Subject: [PATCH] Add list of load error codes from the spec to docs Fixes #1370 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 687a298e..cdc0de23 100644 --- a/README.md +++ b/README.md @@ -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](http://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`