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 Type Description NETWORKnumber Errors from the network stack. TEXTnumber Errors parsing text streams. MEDIAnumber Errors parsing or processing audio or video streams. MANIFESTnumber Errors parsing the Manifest. STREAMINGnumber Errors related to streaming. DRMnumber Errors related to DRM. - 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.
Name Type Description UNSUPPORTED_SCHEMEnumber A network request was made using an unsupported URI scheme.
error.data[0] is the URI.BAD_HTTP_STATUSnumber 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.HTTP_ERRORnumber An HTTP network request failed with an error, but not from the server.
error.data[0] is the URI.TIMEOUTnumber A network request timed out.
error.data[0] is the URI.MALFORMED_DATA_URInumber A network request was made with a malformed data URI.
error.data[0] is the URI.UNKNOWN_DATA_URI_ENCODINGnumber A network request was made with a data URI using an unknown encoding.
error.data[0] is the URI.INVALID_TEXT_HEADERnumber The text parser failed to parse a text stream due to an invalid header. INVALID_TEXT_CUEnumber The text parser failed to parse a text stream due to an invalid cue. INVALID_TEXT_SETTINGSnumber The text parser failed to parse a text stream due to invalid cue settings. UNABLE_TO_DETECT_ENCODINGnumber Was unable to detect the encoding of the response text. Suggest adding byte-order-markings to the response data. BAD_ENCODINGnumber The response data contains invalid Unicode character encoding. BUFFER_READ_OUT_OF_BOUNDSnumber Some component tried to read past the end of a buffer. The segment index, init segment, or PSSH may be malformed. JS_INTEGER_OVERFLOWnumber 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_OVERFLOWnumber 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_SIZEnumber 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_TYPEnumber The MP4 SIDX parser found the wrong box type. Either the segment index range is incorrect or the data is corrupt. MP4_SIDX_INVALID_TIMESCALEnumber The MP4 SIDX parser encountered an invalid timescale. The segment index data may be corrupt. MP4_SIDX_TYPE_NOT_SUPPORTEDnumber The MP4 SIDX parser encountered a type of SIDX that is not supported. WEBM_CUES_ELEMENT_MISSINGnumber The WebM Cues parser was unable to locate the Cues element. The segment index data may be corrupt. WEBM_EBML_HEADER_ELEMENT_MISSINGnumber The WebM header parser was unable to locate the Ebml element. The init segment data may be corrupt. WEBM_SEGMENT_ELEMENT_MISSINGnumber The WebM header parser was unable to locate the Segment element. The init segment data may be corrupt. WEBM_INFO_ELEMENT_MISSINGnumber The WebM header parser was unable to locate the Info element. The init segment data may be corrupt. WEBM_DURATION_ELEMENT_MISSINGnumber 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_MISSINGnumber The WebM Cues parser was unable to locate the Cue Track Positions element. The segment index data may be corrupt. WEBM_CUE_TIME_ELEMENT_MISSINGnumber The WebM Cues parser was unable to locate the Cue Time element. The segment index data may be corrupt. MEDIA_SOURCE_OPERATION_FAILEDnumber A MediaSource operation failed.
error.data[0] is a MediaError code from the video element.MEDIA_SOURCE_OPERATION_THREWnumber A MediaSource operation threw an exception.
error.data[0] is the exception that was thrown.VIDEO_ERRORnumber 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.UNABLE_TO_GUESS_MANIFEST_TYPEnumber 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_XMLnumber The DASH Manifest contained invalid XML markup. DASH_NO_SEGMENT_INFOnumber The DASH Manifest contained a representation with no Segment info. This can occur if there are no Segment* in a Representation or if one of the Segment* elements do not contain enough Segment information. DASH_EMPTY_ADAPTATION_SETnumber The DASH Manifest contained an AdaptationSet with no Representations. DASH_EMPTY_PERIODnumber The DASH Manifest contained an Period with no AdaptationSets. DASH_WEBM_MISSING_INITnumber The DASH Manifest does not specify an init segment with a WebM container. DASH_UNSUPPORTED_CONTAINERnumber The DASH Manifest contained an unsupported container format. DASH_PSSH_BAD_ENCODINGnumber The embedded PSSH data has invalid encoding. DASH_NO_COMMON_KEY_SYSTEMnumber There is an AdaptationSet whose Representations do not have any common key-systems. DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTEDnumber Having multiple key IDs per Representation is not supported. DASH_CONFLICTING_KEY_IDSnumber The DASH Manifest specifies conflicting key IDs. UNPLAYABLE_PERIODnumber 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. INCONSISTENT_BUFFER_STATEnumber The StreamingEngine appended a segment but the SourceBuffer is empty, or the StreamingEngine removed all segments and the SourceBuffer is non-empty. This is an unrecoverable error.
error.data[0] is the type of content which caused the error.INVALID_SEGMENT_INDEXnumber The StreamingEngine cannot append the next segment because the segment's corresponding SegmentReference does not exist (i.e., findSegmentPosition() succeeded but getSegmentReference() failed) or the segment's corresponding SegmentReference has an invalid time range. This is a non-recoverable error.
error.data[0] is the type of content which caused the error.
error.data[1] is the index of the Period.
error.data[2] is the position of the segment.SEGMENT_DOES_NOT_EXISTnumber The StreamingEngine cannot append the next segment because the next segment does not exist (i.e., findSegmentPosition() failed). This can occur for three reasons: 1. there is positive drift (the segments' timestamps are ahead of the manifest's timestamps) and the playhead is outside the drifted segment availability window. 2. the manifest is not updating fast enough for live presentations; or 3. the manifest is not complete. The first case is a recoverable error; recovery may be attempted by repositioning the playhead under a segment.
error.data[0] is the type of content which caused the error.
error.data[1] is the index of the Period.
error.data[2] is the timestamp needed.BAD_SEGMENTnumber The StreamingEngine inserted a media segment, but the segment did not contain any actual media content. This is likely a non-recoverable error; however, recovery may be attempted by seeking forwards or backwards (e.g., nudging the playhead).
error.data[0] is the type of content which caused the error.INVALID_STREAMS_CHOSENnumber The StreamingEngine called onChooseStreams() but the callback receiver did not return the correct number or type of Streams. NO_RECOGNIZED_KEY_SYSTEMSnumber The manifest indicated protected content, but the manifest parser was unable to determine what key systems should be used. REQUESTED_KEY_SYSTEMS_UNAVAILABLEnumber None of the requested key systems are available. A license server URI is required; so this may also happen if the key systems do not have a license server URI. FAILED_TO_CREATE_CDMnumber 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_VIDEOnumber 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_CERTIFICATEnumber 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_SESSIONnumber 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_REQUESTnumber 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_FAILEDnumber 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_REJECTEDnumber 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_INFOnumber The manifest does not specify any DRM info, but the content is encrypted. Either the manifest or the manifest parser are broken. - 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