The MediaError interface represents an error which occurred while handling media in an HTML media element based on HTMLMediaElement, such as audio or video.

Documentation MediaError by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Static variables

@:value(1)staticinlineread onlyMEDIA_ERR_ABORTED:Int = 1

@:value(3)staticinlineread onlyMEDIA_ERR_DECODE:Int = 3

@:value(2)staticinlineread onlyMEDIA_ERR_NETWORK:Int = 2

@:value(4)staticinlineread onlyMEDIA_ERR_SRC_NOT_SUPPORTED:Int = 4

Variables

read onlycode:Int

A number which represents the general type of error that occurred, as follows: /en-US/docs/Web/API/MediaError/code

read onlymessage:String

A DOMString object containing a human-readable string which provides specific diagnostic information to help the reader understand the error condition which occurred; specifically, it isn't simply a summary of what the error code means, but actual diagnostic information to help in understanding what exactly went wrong. This text and its format is not defined by the specification and will vary from one user agent to another. If no diagnostics are available, or no explanation can be provided, this value is an empty string ("").