as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

MediaError

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.


MEDIA_ERR_ABORTED

readonly static MEDIA_ERR_ABORTED: 1 = 1

The fetching process for the media resource was aborted by the platform at the user's request.

For additional information, see https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_aborted.


MEDIA_ERR_DECODE

readonly static MEDIA_ERR_DECODE: 3 = 3

An error of some description occurred while decoding the media resource, after the resource was established to be usable.

For additional information, see https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_decode.


MEDIA_ERR_NETWORK

readonly static MEDIA_ERR_NETWORK: 2 = 2

A network error of some description caused the platform to stop fetching the media resource, after the resource was established to be usable.

https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_network.


MEDIA_ERR_SRC_NOT_SUPPORTED

readonly static MEDIA_ERR_SRC_NOT_SUPPORTED: 4 = 4

The media resource indicated by the src attribute or assigned media provider object was not suitable.

For additional information, see https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_src_not_supported.


Last updated: Oct 02, 2025