new MediaError(value)
A Custom MediaError
class which mimics the standard HTML5 MediaError
class.
Parameters:
Name | Type | Description |
---|---|---|
value |
number | string | Object | MediaError | This can be of multiple types:
|
- Source:
- media-error.js
- See:
Members
-
<static, constant> defaultMessages :Array
-
The default
MediaError
messages based on the MediaError.errorTypes.Type:
- Array
- Source:
- media-error.js
-
<static, readonly> errorTypes :array
-
Errors indexed by the W3C standard. The order CANNOT CHANGE! See the specification listed under MediaError for more information.
Type:
- array
- Source:
- media-error.js
Properties:
Name Type Description 0
string MEDIA_ERR_CUSTOM
1
string MEDIA_ERR_CUSTOM
2
string MEDIA_ERR_ABORTED
3
string MEDIA_ERR_NETWORK
4
string MEDIA_ERR_SRC_NOT_SUPPORTED
5
string MEDIA_ERR_ENCRYPTED
-
<static, constant> MEDIA_ERR_ABORTED :number
-
W3C error code for media error aborted.
Type:
- number
- Default Value:
-
- 1
- Source:
- media-error.js
-
<static, constant> MEDIA_ERR_CUSTOM :number
-
W3C error code for any custom error.
Type:
- number
- Default Value:
-
- 0
- Source:
- media-error.js
-
<static, constant> MEDIA_ERR_DECODE :number
-
W3C error code for any decoding error.
Type:
- number
- Default Value:
-
- 3
- Source:
- media-error.js
-
<static, constant> MEDIA_ERR_ENCRYPTED :number
-
W3C error code for any time that a source is encrypted.
Type:
- number
- Default Value:
-
- 5
- Source:
- media-error.js
-
<static, constant> MEDIA_ERR_NETWORK :number
-
W3C error code for any network error.
Type:
- number
- Default Value:
-
- 2
- Source:
- media-error.js
-
<static, constant> MEDIA_ERR_SRC_NOT_SUPPORTED :number
-
W3C error code for any time that a source is not supported.
Type:
- number
- Default Value:
-
- 4
- Source:
- media-error.js
-
code :Number
-
The error code that refers two one of the defined
MediaError
typesType:
- Number
- Source:
- media-error.js
-
<constant> MEDIA_ERR_ABORTED :number
-
W3C error code for media error aborted.
Type:
- number
- Default Value:
-
- 1
- Source:
- media-error.js
-
<constant> MEDIA_ERR_CUSTOM :number
-
W3C error code for any custom error.
Type:
- number
- Default Value:
-
- 0
- Source:
- media-error.js
-
<constant> MEDIA_ERR_DECODE :number
-
W3C error code for any decoding error.
Type:
- number
- Default Value:
-
- 3
- Source:
- media-error.js
-
<constant> MEDIA_ERR_ENCRYPTED :number
-
W3C error code for any time that a source is encrypted.
Type:
- number
- Default Value:
-
- 5
- Source:
- media-error.js
-
<constant> MEDIA_ERR_NETWORK :number
-
W3C error code for any network error.
Type:
- number
- Default Value:
-
- 2
- Source:
- media-error.js
-
<constant> MEDIA_ERR_SRC_NOT_SUPPORTED :number
-
W3C error code for any time that a source is not supported.
Type:
- number
- Default Value:
-
- 4
- Source:
- media-error.js
-
message :String
-
An optional message that to show with the error. Message is not part of the HTML5 video spec but allows for more informative custom errors.
Type:
- String
- Source:
- media-error.js
-
status :Array
-
An optional status code that can be set by plugins to allow even more detail about the error. For example a plugin might provide a specific HTTP status code and an error message for that code. Then when the plugin gets that error this class will know how to display an error message for it. This allows a custom message to show up on the
Player
error overlay.Type:
- Array
- Source:
- media-error.js