扩展自
MediaErrorImpl
构造函数
new MediaError()
new MediaError(code, message): MediaError
参数
code
number
message
string
返回值
MediaError属性
code
readonly code: number
从下面的列表中返回当前错误的错误代码。
有关更多信息,请参阅https://html.spec.whatwg.org/multipage/media.html#concept-mediaerror-code(仅提供英文版)。
message
readonly message: string
返回有关遇到的错误情况的特定信息性诊断消息。
有关更多信息,请参阅https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-message(仅提供英文版)。
MEDIA_ERR_ABORTED
static readonly MEDIA_ERR_ABORTED: 1 = 1
应用户的要求,平台中止了媒体资源的获取过程。
有关更多信息,请参阅https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_aborted(仅提供英文版)。
MEDIA_ERR_NETWORK
static readonly MEDIA_ERR_NETWORK: 2 = 2
在确定媒体资源可用后,某种描述的网络错误导致平台停止获取媒体资源。
https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_network(仅提供英文版)。
MEDIA_ERR_DECODE
static readonly MEDIA_ERR_DECODE: 3 = 3
在确定资源可用之后,在解码媒体资源时出现了某种描述的错误。
有关更多信息,请参阅https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_decode(仅提供英文版)。
MEDIA_ERR_SRC_NOT_SUPPORTED
static readonly MEDIA_ERR_SRC_NOT_SUPPORTED: 4 = 4
由src属性或分配的媒体提供者对象指示的媒体资源不合适。
有关更多信息,请参阅https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_src_not_supported(仅提供英文版)。

