Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
All media elements have an associated error status, which records the last error the element encountered since its resource selection algorithm was last invoked. The error attribute, on getting, must return the MediaError object created for this last error, or null if there has not been an error.
For additional information, see https://html.spec.whatwg.org/multipage/media.html#mediaerror.

Constructors

new MediaError()

new MediaError(code, message): MediaError

Parameters

code
number
message
string

Returns

MediaError

Properties

code

readonly code: number Returns the current error’s error code, from the list below. For additional information, see https://html.spec.whatwg.org/multipage/media.html#concept-mediaerror-code.

message

readonly message: string Returns a specific informative diagnostic message about the error condition encountered. For additional information, see https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-message.
Last modified on February 25, 2026