Constructor
new Error(category, code, …var_args)
Creates a new Error.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
category |
shaka.util.Error.Category | ||
code |
shaka.util.Error.Code | ||
var_args |
* |
<repeatable> |
- Extends:
- Error
- Source:
Members
-
(static) Category :number
-
Type:
- number
Properties:
Name Value Type Description NETWORK1 number Errors from the network stack. TEXT2 number Errors parsing text streams. MEDIA3 number Errors parsing or processing audio or video streams. MANIFEST4 number Errors parsing the Manifest. STREAMING5 number Errors related to streaming. DRM6 number Errors related to DRM. PLAYER7 number Miscellaneous errors from the player. CAST8 number Errors related to cast. STORAGE9 number Errors in the database storage (offline). - Source:
-
(static) Code :number
-
Type:
- number
Properties:
- Rename the manifest so that the URI ends in a well-known extension.
- Configure the server to send a recognizable Content-Type header.
- Configure the server to accept a HEAD request for the manifest.
- The application has given restrictions to the Player that restrict at least one content type completely (e.g. no playable audio).
- The key system has imposed output restrictions that cannot be met (such as HDCP) and there are no unrestricted alternatives.
- The key system is not supported.
- The key system does not support the features requested (e.g. persistent state).
- A user prompt was shown and the user denied access.
- The key system is not available from unsecure contexts. (ie. requires HTTPS) See https://goo.gl/EEhZqT.
Name Value Type Description UNSUPPORTED_SCHEME1000 number A network request was made using an unsupported URI scheme.
error.data[0] is the URI.BAD_HTTP_STATUS1001 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.HTTP_ERROR1002 number An HTTP network request failed with an error, but not from the server.
error.data[0] is the URI.TIMEOUT1003 number A network request timed out.
error.data[0] is the URI.MALFORMED_DATA_URI1004 number A network request was made with a malformed data URI.
error.data[0] is the URI.UNKNOWN_DATA_URI_ENCODING1005 number A network request was made with a data URI using an unknown encoding.
error.data[0] is the URI.INVALID_TEXT_HEADER2000 number The text parser failed to parse a text stream due to an invalid header. INVALID_TEXT_CUE2001 number The text parser failed to parse a text stream due to an invalid cue. UNABLE_TO_DETECT_ENCODING2003 number Was unable to detect the encoding of the response text. Suggest adding byte-order-markings to the response data. BAD_ENCODING2004 number The response data contains invalid Unicode character encoding. INVALID_XML2005 number The XML parser failed to parse an xml stream. INVALID_TTML2006 number TTML stream lacks mandatory elements. INVALID_MP4_TTML2007 number MP4 segment does not contain TTML. INVALID_MP4_VTT2008 number MP4 segment does not contain VTT. BUFFER_READ_OUT_OF_BOUNDS3000 number Some component tried to read past the end of a buffer. The segment index, init segment, or PSSH may be malformed. JS_INTEGER_OVERFLOW3001 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_OVERFLOW3002 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_SIZE3003 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_TYPE3004 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_TIMESCALE3005 number The MP4 SIDX parser encountered an invalid timescale. The segment index data may be corrupt. MP4_SIDX_TYPE_NOT_SUPPORTED3006 number The MP4 SIDX parser encountered a type of SIDX that is not supported. WEBM_CUES_ELEMENT_MISSING3007 number The WebM Cues parser was unable to locate the Cues element. The segment index data may be corrupt. WEBM_EBML_HEADER_ELEMENT_MISSING3008 number The WebM header parser was unable to locate the Ebml element. The init segment data may be corrupt. WEBM_SEGMENT_ELEMENT_MISSING3009 number The WebM header parser was unable to locate the Segment element. The init segment data may be corrupt. WEBM_INFO_ELEMENT_MISSING3010 number The WebM header parser was unable to locate the Info element. The init segment data may be corrupt. WEBM_DURATION_ELEMENT_MISSING3011 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_MISSING3012 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_MISSING3013 number The WebM Cues parser was unable to locate the Cue Time element. The segment index data may be corrupt. MEDIA_SOURCE_OPERATION_FAILED3014 number A MediaSource operation failed.
error.data[0] is a MediaError code from the video element.MEDIA_SOURCE_OPERATION_THREW3015 number A MediaSource operation threw an exception.
error.data[0] is the exception that was thrown.VIDEO_ERROR3016 number The video element reported an error.
error.data[0] is a MediaError code from the video element.
On Edge & IE, error.data[1] is a Microsoft extended error code in hex.QUOTA_EXCEEDED_ERROR3017 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.UNABLE_TO_GUESS_MANIFEST_TYPE4000 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_XML4001 number The DASH Manifest contained invalid XML markup. DASH_NO_SEGMENT_INFO4002 number The DASH Manifest contained a Representation with insufficient segment information. DASH_EMPTY_ADAPTATION_SET4003 number The DASH Manifest contained an AdaptationSet with no Representations. DASH_EMPTY_PERIOD4004 number The DASH Manifest contained an Period with no AdaptationSets. DASH_WEBM_MISSING_INIT4005 number The DASH Manifest does not specify an init segment with a WebM container. DASH_UNSUPPORTED_CONTAINER4006 number The DASH Manifest contained an unsupported container format. DASH_PSSH_BAD_ENCODING4007 number The embedded PSSH data has invalid encoding. DASH_NO_COMMON_KEY_SYSTEM4008 number There is an AdaptationSet whose Representations do not have any common key-systems. DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED4009 number Having multiple key IDs per Representation is not supported. DASH_CONFLICTING_KEY_IDS4010 number The DASH Manifest specifies conflicting key IDs. UNPLAYABLE_PERIOD4011 number The manifest contains a period with no playable streams. Either the period was originally empty, or the streams within cannot be played on this browser or platform. RESTRICTIONS_CANNOT_BE_MET4012 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: NO_PERIODS4014 number No valid periods were found in the manifest. Please check that your manifest is correct and free of typos. DASH_DUPLICATE_REPRESENTATION_ID4018 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. INVALID_STREAMS_CHOSEN5005 number The StreamingEngine called onChooseStreams() but the callback receiver did not return the correct number or type of Streams. This can happen when there is multi-Period content where one Period is video+audio and another is video-only or audio-only. We don't support this case because it is incompatible with MSE. When the browser reaches the transition, it will pause, waiting for the audio stream. NO_RECOGNIZED_KEY_SYSTEMS6000 number The manifest indicated protected content, but the manifest parser was unable to determine what key systems should be used. REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE6001 number None of the requested key system configurations are available. This may happen under the following conditions: FAILED_TO_CREATE_CDM6002 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_VIDEO6003 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_CERTIFICATE6004 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_SESSION6005 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_REQUEST6006 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.LICENSE_REQUEST_FAILED6007 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_REJECTED6008 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.ENCRYPTED_CONTENT_WITHOUT_DRM_INFO6010 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_GIVEN6012 number No license server was given for the key system signaled by the manifest. A license server URI is required for every key system. OFFLINE_SESSION_REMOVED6013 number A required offline session was removed. The content is not playable. EXPIRED6014 number The license has expired. This is triggered when playback is stalled on a 'waitingforkeys' event and there are any expired keys in the key status map of any active session. LOAD_INTERRUPTED7000 number The call to Player.load() was interrupted by a call to Player.unload() or another call to Player.load(). CAST_API_UNAVAILABLE8000 number The Cast API is unavailable. This may be because of one of the following: - The browser may not have Cast support - The browser may be missing a necessary Cast extension - The Cast sender library may not be loaded in your app NO_CAST_RECEIVERS8001 number No cast receivers are available at this time. ALREADY_CASTING8002 number The library is already casting. UNEXPECTED_CAST_ERROR8003 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_USER8004 number The cast operation was canceled by the user.
error.data[0] is an error object from the Cast SDK.CAST_CONNECTION_TIMED_OUT8005 number The cast connection timed out.
error.data[0] is an error object from the Cast SDK.CAST_RECEIVER_APP_UNAVAILABLE8006 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.INDEXED_DB_NOT_SUPPORTED9000 number IndexedDb is not supported on this browser; it is required for offline support. INDEXED_DB_ERROR9001 number An unknown error occurred in the IndexedDB.
error.data[0] is the error object.OPERATION_ABORTED9002 number The operation was aborted. For example, by a call to destroy(). REQUESTED_ITEM_NOT_FOUND9003 number The specified item was not found in the IndexedDB.
error.data[0] is the offline URI.MALFORMED_OFFLINE_URI9004 number A network request was made with a malformed offline URI.
error.data[0] is the URI.CANNOT_STORE_LIVE_OFFLINE9005 number The specified content is live or in-progress. Live and in-progress streams cannot be stored offline.
error.data[0] is the URI.STORE_ALREADY_IN_PROGRESS9006 number There is already a store operation in-progress, wait until it completes before starting another. NO_INIT_DATA_FOR_OFFLINE9007 number The specified manifest is encrypted but does not specify any init data. Without init data specified in the manifest, the content will not be playable offline.
error.data[0] is the URI.- Source:
-
(constant) category :shaka.util.Error.Category
-
Type:
- Source:
-
(constant) code :shaka.util.Error.Code
-
Type:
- Source:
-
(constant, non-null) data :Array.<*>
-
Type:
- Array.<*>
- Source:
-
(constant) message :string
-
A human-readable version of the category and code. (Only available in uncompiled mode.)
Type:
- string
- Source:
-
(constant) stack :string
-
A stack-trace showing where the error occurred. (Only available in uncompiled mode.)
Type:
- string
- Source:
Methods
-
toString() → {string}
-
- Source:
Returns:
- Type
- string