The RTCError() constructor creates and returns a new RTCError object instance.
new RTCError(options)
new RTCError(options, message)optionsAn object providing the details of the specific error in an RTCErrorEvent. The object has the following properties:
errorDetailA string specifying the WebRTC-specific error code identifying the type of error that occurred. This will be one of:
data-channel-failureThe connection's RTCDataChannel has failed.
dtls-failureThe negotiation of the DTLS connection failed, or the connection was terminated with a fatal error. The error's message contains details about the nature of the error.
receivedAlert to the value of the received DTLS alert.sentAlert to the alert's value.fingerprint-failureThe remote certificate for the RTCDtlsTransport didn't match any of the fingerprints listed in the SDP message. If the remote peer can't match the local certificate against the provided fingerprints, this error doesn't occur, though this situation may result instead in a dtls-failure error.
hardware-encoder-errorThe hardware encoder doesn't support the given configuration parameters.
hardware-encoder-not-availableThe hardware encoder resources required to accomplish the requested operation aren't available.
sctp-failureThe SCTP negotiation has failed, or the connection has terminated with a fatal error. The SCTP cause code should be set in sctpCauseCode. SCTP error cause codes 1-13 are defined in the SCTP specification: RFC 4960, section 3.3.10.
sdp-syntax-errorThe SDP syntax is invalid. The SDP message line number at which the error was detected should be set in sdpLineNumber.
receivedAlert OptionalA positive integer value indicating a fatal DTLS error that was received from the network. Only set if the errorDetail string is dtls-failure.
sctpCauseCode OptionalAn integer specifying the SCTP cause code that indicates the cause of the failed SCTP negotiation. This should only be set if errorDetail is sctp-failure.
sdpLineNumber OptionalAn integer identifying the SDP message line number at which a syntax error occurred. Only set if errorDetail is sdp-syntax-error.
sentAlert OptionalA positive integer indicating a fatal DTLS error that was sent out by this device. Only set if errorDetail is dtls-failure.
message OptionalA string for the error message. Defaults to the empty string ("").
A newly-created RTCError object instance.
This constructor does not do complete validation of the specified candidateInfo object or string.