code property
Returns the current HTMLMediaError code or null if no error has occurred.
![]() ![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: number
-
The fetching process for the media resource was aborted by the user.
-
A network error has caused the user agent to stop fetching the media resource, after the resource was established to be usable.
-
An error has occurred in the decoding of the media resource, after the resource was established to be usable.
-
The media resource specified by src was not usable.
-
The encrypted media stream could not be played. This is because of one of the following conditions:
- A key was not provided and a onmsneedkey handler was not provided
- The provided key could not be applied.
- Decryption is not supported for this media data.
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.8.9.1
Remarks
If no error has occurred, the MediaError object is null.
See also
Show:

