Constructor
new Error(severity, category, code, …varArgs)
Describes an error that happened.
This uses numerical codes to describe
which error happened.
Some error are caused by errors from the browser. In these cases, the error
object is provided as part of the
data
field. System codes come
from the browser and may or may not be documented. Here are some places
where the errors may be documented:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
severity |
shaka.util.Error.Severity | ||
category |
shaka.util.Error.Category | ||
code |
shaka.util.Error.Code | ||
varArgs |
* |
<repeatable> |
- Implements:
- Extends:
- Error
- Source:
Extends
- Error
Members
Category :number
Type:
- number
Properties:
Name | Value | Type | Description |
---|---|---|---|
NETWORK |
1 | number | Errors from the network stack. |
TEXT |
2 | number | Errors parsing text streams. |
MEDIA |
3 | number | Errors parsing or processing audio or video streams. |
MANIFEST |
4 | number | Errors parsing the Manifest. |
STREAMING |
5 | number | Errors related to streaming. |
DRM |
6 | number | Errors related to DRM. |
PLAYER |
7 | number | Miscellaneous errors from the player. |
CAST |
8 | number | Errors related to cast. |
STORAGE |
9 | number | Errors in the database storage (offline). |
ADS |
10 | number | Errors related to ad insertion. |
- Source:
Code :number
Type:
- number
Properties:
Name | Value | Type | Description |
---|---|---|---|
UNSUPPORTED_SCHEME |
1000 | number | A network request was made using an unsupported URI scheme.
error.data[0] is the URI. |
BAD_HTTP_STATUS |
1001 | number | An HTTP network request returned an HTTP status that indicated a failure.
error.data[0] is the URI. error.data[1] is the status code. error.data[2] is the response text, or null if the response could not be interpretted as text. error.data[3] is the map of response headers. error.data[4] is the NetworkingEngine.RequestType of the request, if one was provided. |
HTTP_ERROR |
1002 | number | An HTTP network request failed with an error, but not from the server.
error.data[0] is the URI. error.data[1] is the original error. error.data[2] is the NetworkingEngine.RequestType of the request. |
TIMEOUT |
1003 | number | A network request timed out.
error.data[0] is the URI. error.data[1] is the NetworkingEngine.RequestType of the request, if one was provided. |
MALFORMED_DATA_URI |
1004 | number | A network request was made with a malformed data URI.
error.data[0] is the URI. |
REQUEST_FILTER_ERROR |
1006 | number | A request filter threw an error.
error.data[0] is the original error. |
RESPONSE_FILTER_ERROR |
1007 | number | A response filter threw an error.
error.data[0] is the original error. |
MALFORMED_TEST_URI |
1008 | number | A testing network request was made with a malformed URI. This error is only used by unit and integration tests. |
UNEXPECTED_TEST_REQUEST |
1009 | number | An unexpected network request was made to the FakeNetworkingEngine. This error is only used by unit and integration tests. |
ATTEMPTS_EXHAUSTED |
1010 | number | The number of retry attempts have run out. This is an internal error and shouldn't be propagated. |
SEGMENT_MISSING |
1011 | number | The segment is missing.
error.data[0] is the URI. |
INVALID_TEXT_HEADER |
2000 | number | The text parser failed to parse a text stream due to an invalid header. |
INVALID_TEXT_CUE |
2001 | number | The text parser failed to parse a text stream due to an invalid cue.
error.data[0] is extra context, if available. |
UNABLE_TO_DETECT_ENCODING |
2003 | number | Was unable to detect the encoding of the response text. Suggest adding byte-order-markings to the response data. |
BAD_ENCODING |
2004 | number | The response data contains invalid Unicode character encoding. |
INVALID_XML |
2005 | number | The XML parser failed to parse an xml stream, or the XML lacks mandatory
elements for TTML.
error.data[0] is extra context, if available. |
INVALID_MP4_TTML |
2007 | number | MP4 segment does not contain TTML. |
INVALID_MP4_VTT |
2008 | number | MP4 segment does not contain VTT. |
UNABLE_TO_EXTRACT_CUE_START_TIME |
2009 | number | When examining media in advance, we were unable to extract the cue time.
This should only be possible with HLS, where we do not have explicit
segment start times.
error.data[0] is the underlying exception or Error object. |
INVALID_MP4_CEA |
2010 | number | MP4 segment for CEA data is invalid. |
TEXT_COULD_NOT_GUESS_MIME_TYPE |
2011 | number | Unable to guess mime type of the text.
error.data[0] is the text file's extension. |
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS |
2012 | number | External text tracks cannot be added in src= because native platform doesn't support it. |
TEXT_ONLY_WEBVTT_SRC_EQUALS |
2013 | number | Only WebVTT is supported when using src=.
error.data[0] is the text MIME type. |
MISSING_TEXT_PLUGIN |
2014 | number | The compilation does not contain a required text plugin for this
operation.
error.data[0] is the text MIME type. |
CHAPTERS_TRACK_FAILED |
2015 | number | The chapters track failed to load. The browser does not provide any information in this case to identify why it failed, but there may be details in the JavaScript console. |
BUFFER_READ_OUT_OF_BOUNDS |
3000 | number | Some component tried to read past the end of a buffer. The segment index, init segment, or PSSH may be malformed. |
JS_INTEGER_OVERFLOW |
3001 | number | Some component tried to parse an integer that was too large to fit in a JavaScript number without rounding error. JavaScript can only natively represent integers up to 53 bits. |
EBML_OVERFLOW |
3002 | number | The EBML parser used to parse the WebM container encountered an integer, ID, or other field larger than the maximum supported by the parser. |
EBML_BAD_FLOATING_POINT_SIZE |
3003 | number | The EBML parser used to parse the WebM container encountered a floating- point field of a size not supported by the parser. |
MP4_SIDX_WRONG_BOX_TYPE |
3004 | number | The MP4 SIDX parser found the wrong box type. Either the segment index range is incorrect or the data is corrupt. |
MP4_SIDX_INVALID_TIMESCALE |
3005 | number | The MP4 SIDX parser encountered an invalid timescale. The segment index data may be corrupt. |
MP4_SIDX_TYPE_NOT_SUPPORTED |
3006 | number | The MP4 SIDX parser encountered a type of SIDX that is not supported. |
WEBM_CUES_ELEMENT_MISSING |
3007 | number | The WebM Cues parser was unable to locate the Cues element. The segment index data may be corrupt. |
WEBM_EBML_HEADER_ELEMENT_MISSING |
3008 | number | The WebM header parser was unable to locate the Ebml element. The init segment data may be corrupt. |
WEBM_SEGMENT_ELEMENT_MISSING |
3009 | number | The WebM header parser was unable to locate the Segment element. The init segment data may be corrupt. |
WEBM_INFO_ELEMENT_MISSING |
3010 | number | The WebM header parser was unable to locate the Info element. The init segment data may be corrupt. |
WEBM_DURATION_ELEMENT_MISSING |
3011 | number | The WebM header parser was unable to locate the Duration element. The init segment data may be corrupt or may have been incorrectly encoded. Shaka requires a duration in WebM DASH content. |
WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING |
3012 | number | The WebM Cues parser was unable to locate the Cue Track Positions element. The segment index data may be corrupt. |
WEBM_CUE_TIME_ELEMENT_MISSING |
3013 | number | The WebM Cues parser was unable to locate the Cue Time element. The segment index data may be corrupt. |
MEDIA_SOURCE_OPERATION_FAILED |
3014 | number | A MediaSource operation failed.
error.data[0] is a MediaError code from the video element. |
MEDIA_SOURCE_OPERATION_THREW |
3015 | number | A MediaSource operation threw an exception.
error.data[0] is the exception that was thrown. |
VIDEO_ERROR |
3016 | number | The video element reported an error.
error.data[0] is a MediaError code from the video element. On Edge, error.data[1] is a Microsoft extended error code in hex. On Chrome, error.data[2] is a string with details on the error. See top of file for links to browser error codes. |
QUOTA_EXCEEDED_ERROR |
3017 | number | A MediaSource operation threw QuotaExceededError and recovery failed. The
content cannot be played correctly because the segments are too large for
the browser/platform. This may occur when attempting to play very high
quality, very high bitrate content on low-end devices.
error.data[0] is the type of content which caused the error. |
TRANSMUXING_FAILED |
3018 | number | Mux.js did not invoke the callback signifying successful transmuxing. |
CONTENT_TRANSFORMATION_FAILED |
3019 | number | Content transformations required by the platform could not be performed for some reason (unsupported container, etc.) |
UNABLE_TO_GUESS_MANIFEST_TYPE |
4000 | number | The Player was unable to guess the manifest type based on file extension
or MIME type. To fix, try one of the following:
error.data[0] is the manifest URI. |
DASH_INVALID_XML |
4001 | number | The DASH Manifest contained invalid XML markup.
error.data[0] is the URI associated with the XML. |
DASH_NO_SEGMENT_INFO |
4002 | number | The DASH Manifest contained a Representation with insufficient segment information. |
DASH_EMPTY_ADAPTATION_SET |
4003 | number | The DASH Manifest contained an AdaptationSet with no Representations. |
DASH_EMPTY_PERIOD |
4004 | number | The DASH Manifest contained an Period with no AdaptationSets. |
DASH_WEBM_MISSING_INIT |
4005 | number | The DASH Manifest does not specify an init segment with a WebM container. |
DASH_UNSUPPORTED_CONTAINER |
4006 | number | The DASH Manifest contained an unsupported container format. |
DASH_PSSH_BAD_ENCODING |
4007 | number | The embedded PSSH data has invalid encoding. |
DASH_NO_COMMON_KEY_SYSTEM |
4008 | number | There is an AdaptationSet whose Representations do not have any common key-systems. |
DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED |
4009 | number | Having multiple key IDs per Representation is not supported. |
DASH_CONFLICTING_KEY_IDS |
4010 | number | The DASH Manifest specifies conflicting key IDs. |
RESTRICTIONS_CANNOT_BE_MET |
4012 | number | There exist some streams that could be decoded, but restrictions imposed
by the application or the key system prevent us from playing. This may
happen under the following conditions:
error.data[0] is a shaka.extern.RestrictionInfo object describing the kinds of restrictions that caused this error. |
HLS_PLAYLIST_HEADER_MISSING |
4015 | number | HLS playlist doesn't start with a mandory #EXTM3U tag. |
INVALID_HLS_TAG |
4016 | number | HLS tag has an invalid name that doesn't start with '#EXT'
error.data[0] is the invalid tag. |
HLS_INVALID_PLAYLIST_HIERARCHY |
4017 | number | HLS playlist has both Master and Media/Segment tags. |
DASH_DUPLICATE_REPRESENTATION_ID |
4018 | number | A Representation has an id that is the same as another Representation in the same Period. This makes manifest updates impossible since we cannot map the updated Representation to the old one. |
HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND |
4020 | number | HLS manifest has several #EXT-X-MAP tags. We can only support one at the moment. |
HLS_REQUIRED_ATTRIBUTE_MISSING |
4023 | number | One of the required attributes was not provided, so the
HLS manifest is invalid.
error.data[0] is the missing attribute's name. |
HLS_REQUIRED_TAG_MISSING |
4024 | number | One of the required tags was not provided, so the
HLS manifest is invalid.
error.data[0] is the missing tag's name. |
HLS_COULD_NOT_GUESS_CODECS |
4025 | number | The HLS parser was unable to guess codecs of a stream.
error.data[0] is the list of all codecs for the variant. |
HLS_KEYFORMATS_NOT_SUPPORTED |
4026 | number | The HLS parser has encountered encrypted content with unsupported KEYFORMAT attributes. |
DASH_UNSUPPORTED_XLINK_ACTUATE |
4027 | number | The manifest parser only supports xlink links with xlink:actuate="onLoad". |
DASH_XLINK_DEPTH_LIMIT |
4028 | number | The manifest parser has hit its depth limit on xlink link chains. |
CONTENT_UNSUPPORTED_BY_BROWSER |
4032 | number | The content container or codecs are not supported by this browser. For example, this could happen if the content is WebM, but your browser does not support the WebM container, or if the content uses HEVC, but your browser does not support the HEVC codec. This can also occur for multicodec or multicontainer manifests if none of the codecs or containers are supported by the browser. To see what your browser supports, you can check the JSON data dumped by http://support.shaka-player-demo.appspot.com/ |
CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM |
4033 | number | External text tracks cannot be added to live streams. |
NO_VARIANTS |
4036 | number | The Manifest contained no Variants. |
PERIOD_FLATTENING_FAILED |
4037 | number | We failed to find matching streams across DASH Periods, and the period-flattening aglorithm introduced in v3.0 has failed. |
INCONSISTENT_DRM_ACROSS_PERIODS |
4038 | number | We failed to find matching streams across DASH Periods due to inconsistent DRM systems across periods. |
HLS_VARIABLE_NOT_FOUND |
4039 | number | The HLS manifest refers to an undeclared variables.
error.data[0] is the variable undeclared. |
HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED |
4040 | number | We do not support playing encrypted mp2t with MSE |
HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED |
4041 | number | We do not support playing encrypted content (different than mp2t) with MSE and legacy Apple MediaKeys API. |
NO_WEB_CRYPTO_API |
4042 | number | Web Crypto API is not available (to decrypt AES-128 streams). Web Crypto only exists in secure origins like https. |
HLS_AES_128_INVALID_IV_LENGTH |
4043 | number | AES-128 iv length should be 16 bytes. |
HLS_AES_128_INVALID_KEY_LENGTH |
4044 | number | AES-128 encryption key length should be 16 bytes. |
STREAMING_ENGINE_STARTUP_INVALID_STATE |
5006 | number | This would only happen if StreamingEngine were not started correctly, and should not be seen in production. |
NO_RECOGNIZED_KEY_SYSTEMS |
6000 | number | The manifest indicated protected content, but the manifest parser was unable to determine what key systems should be used. |
REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE |
6001 | number | None of the requested key system configurations are available. This may
happen under the following conditions:
|
FAILED_TO_CREATE_CDM |
6002 | number | The browser found one of the requested key systems, but it failed to
create an instance of the CDM for some unknown reason.
error.data[0] is an error message string from the browser. |
FAILED_TO_ATTACH_TO_VIDEO |
6003 | number | The browser found one of the requested key systems and created an instance
of the CDM, but it failed to attach the CDM to the video for some unknown
reason.
error.data[0] is an error message string from the browser. |
INVALID_SERVER_CERTIFICATE |
6004 | number | The CDM rejected the server certificate supplied by the application.
The certificate may be malformed or in an unsupported format.
error.data[0] is an error message string from the browser. |
FAILED_TO_CREATE_SESSION |
6005 | number | The CDM refused to create a session for some unknown reason.
error.data[0] is an error message string from the browser. |
FAILED_TO_GENERATE_LICENSE_REQUEST |
6006 | number | The CDM was unable to generate a license request for the init data it was
given. The init data may be malformed or in an unsupported format.
error.data[0] is an error message string from the browser. error.data[1] is the error object from the browser. error.data[2] is a string with the extended error code, if available. See top of file for links to browser error codes. |
LICENSE_REQUEST_FAILED |
6007 | number | The license request failed. This could be a timeout, a network failure, or
a rejection by the server.
error.data[0] is a shaka.util.Error from the networking engine. |
LICENSE_RESPONSE_REJECTED |
6008 | number | The license response was rejected by the CDM. The server's response may be
invalid or malformed for this CDM.
error.data[0] is an error message string from the browser. See top of file for links to browser error codes. |
ENCRYPTED_CONTENT_WITHOUT_DRM_INFO |
6010 | number | The manifest does not specify any DRM info, but the content is encrypted. Either the manifest or the manifest parser are broken. |
NO_LICENSE_SERVER_GIVEN |
6012 | number | No license server was given for the key system signaled by the manifest.
A license server URI is required for every key system.
error.data[0] is the key system identifier. |
OFFLINE_SESSION_REMOVED |
6013 | number | A required offline session was removed. The content is not playable. |
EXPIRED |
6014 | number | The license has expired. This is triggered when all keys in the key status map have a status of 'expired'. |
SERVER_CERTIFICATE_REQUIRED |
6015 | number | A server certificate wasn't given when it is required. FairPlay requires setting an explicit server certificate in the configuration. |
INIT_DATA_TRANSFORM_ERROR |
6016 | number | An error was thrown while executing the init data transformation.
error.data[0] is the original error. |
SERVER_CERTIFICATE_REQUEST_FAILED |
6017 | number | The server certificate request failed.
error.data[0] is a shaka.util.Error from the networking engine. |
LOAD_INTERRUPTED |
7000 | number | The call to Player.load() was interrupted by a call to Player.unload() or another call to Player.load(). |
OPERATION_ABORTED |
7001 | number | An internal error which indicates that an operation was aborted. This should not be seen by applications. |
NO_VIDEO_ELEMENT |
7002 | number | The call to Player.load() failed because the Player does not have a video element. The video element must either be provided to the constructor or to Player.attach() before Player.load() is called. |
OBJECT_DESTROYED |
7003 | number | The operation failed because the object has been destroyed. |
CONTENT_NOT_LOADED |
7004 | number | The content has not been loaded in the Player. |
CAST_API_UNAVAILABLE |
8000 | number | The Cast API is unavailable. This may be because of one of the following: 1. The browser may not have Cast support 2. The browser may be missing a necessary Cast extension 3. The Cast sender library may not be loaded in your app |
NO_CAST_RECEIVERS |
8001 | number | No cast receivers are available at this time. |
ALREADY_CASTING |
8002 | number | The library is already casting. |
UNEXPECTED_CAST_ERROR |
8003 | number | A Cast SDK error that we did not explicitly plan for has occurred.
Check data[0] and refer to the Cast SDK documentation for details.
error.data[0] is an error object from the Cast SDK. |
CAST_CANCELED_BY_USER |
8004 | number | The cast operation was canceled by the user.
error.data[0] is an error object from the Cast SDK. |
CAST_CONNECTION_TIMED_OUT |
8005 | number | The cast connection timed out.
error.data[0] is an error object from the Cast SDK. |
CAST_RECEIVER_APP_UNAVAILABLE |
8006 | number | The requested receiver app ID does not exist or is unavailable.
Check the requested app ID for typos.
error.data[0] is an error object from the Cast SDK. |
STORAGE_NOT_SUPPORTED |
9000 | number | Offline storage is not supported on this browser; it is required for offline support. |
INDEXED_DB_ERROR |
9001 | number | An unknown error occurred in the IndexedDB.
On Firefox, one common source for UnknownError calls is reverting Firefox to an old version. This makes the IndexedDB storage inaccessible for older versions. The only way to fix this is to delete the storage data in your profile. See https://mzl.la/2yCGWCm error.data[0] is the error object. |
DEPRECATED_OPERATION_ABORTED |
9002 | number | The storage operation was aborted. Deprecated in favor of more general OPERATION_ABORTED. |
REQUESTED_ITEM_NOT_FOUND |
9003 | number | The specified item was not found in the IndexedDB.
error.data[0] is the offline URI. |
MALFORMED_OFFLINE_URI |
9004 | number | A network request was made with a malformed offline URI.
error.data[0] is the URI. |
CANNOT_STORE_LIVE_OFFLINE |
9005 | number | The specified content is live or in-progress.
Live and in-progress streams cannot be stored offline.
error.data[0] is the URI. |
NO_INIT_DATA_FOR_OFFLINE |
9007 | number | There was no init data available for offline storage. This happens when there is no init data in the manifest nor could we find any in the segments. We currently only support searching MP4 init segments for init data. |
LOCAL_PLAYER_INSTANCE_REQUIRED |
9008 | number | shaka.offline.Storage was constructed with a Player proxy instead of a local player instance. To fix this, use Player directly with Storage instead of the results of CastProxy.prototype.getPlayer(). |
NEW_KEY_OPERATION_NOT_SUPPORTED |
9011 | number | The storage cell does not allow new operations that require new keys. |
KEY_NOT_FOUND |
9012 | number | A key was not found in a storage cell. |
MISSING_STORAGE_CELL |
9013 | number | A storage cell was not found. |
STORAGE_LIMIT_REACHED |
9014 | number | The storage limit defined in downloadSizeCallback has been
reached. |
DOWNLOAD_SIZE_CALLBACK_ERROR |
9015 | number | downloadSizeCallback has produced an unexpected error. |
MODIFY_OPERATION_NOT_SUPPORTED |
9016 | number | The storage cell does not allow new operations that significantly change existing data. |
INDEXED_DB_INIT_TIMED_OUT |
9017 | number | When attempting to open an indexedDB instance, nothing happened for long enough for us to time out. This keeps the storage mechanism from hanging indefinitely, if neither the success nor error callbacks are called. |
CS_IMA_SDK_MISSING |
10000 | number | CS IMA SDK, required for ad insertion, has not been included on the page. |
CS_AD_MANAGER_NOT_INITIALIZED |
10001 | number | Client Side Ad Manager needs to be initialized to enable Client Side Ad Insertion. Call adManager.initClientSide() to do it. |
SS_IMA_SDK_MISSING |
10002 | number | SS IMA SDK, required for ad insertion, has not been included on the page. |
SS_AD_MANAGER_NOT_INITIALIZED |
10003 | number | Server Side Ad Manager needs to be initialized to enable Server Side Ad Insertion. Call adManager.initServerSide() to do it. |
CURRENT_DAI_REQUEST_NOT_FINISHED |
10004 | number | A new DAI steam was requested before the previous request had been resolved. Only one stream request at a time is supported. Please wait for the previous request to complete before initiating a new one. |
- Source:
createStack :boolean
If true, create a stack trace in Error objects.
Only available in uncompiled mode, and disabled in tests to avoid issues
with karma-jasmine. See comments in test/test/boot.js for details.
Type:
- boolean
- Source:
Severity :number
Type:
- number
Properties:
Name | Value | Type | Description |
---|---|---|---|
RECOVERABLE |
1 | number | An error occurred, but the Player is attempting to recover from the error. If the Player cannot ultimately recover, it still may not throw a CRITICAL error. For example, retrying for a media segment will never result in a CRITICAL error (the Player will just retry forever). |
CRITICAL |
2 | number | A critical error that the library cannot recover from. These usually cause the Player to stop loading or updating. A new manifest must be loaded to reset the library. |
- Source:
data :Array.<*>
Type:
- Array.<*>
- Implements:
- Source:
handled :boolean
Type:
- boolean
- Implements:
- Source:
message :string
A human-readable version of the category and code.
(Only available in uncompiled mode.)
Type:
- string
- Source:
stack :string
A stack-trace showing where the error occurred.
(Only available in uncompiled mode.)
Type:
- string
- Source: