diff --git a/index.html b/index.html index 5435267..b7622b8 100644 --- a/index.html +++ b/index.html @@ -1273,35 +1273,184 @@

Modifications to existing procedures

-
-

Event summary

+
+

Exposing encoder and decoder errors to the application

- The following events fire on {{RTCIceTransport}} objects:

- - - - - - - - - - - - - - - - - - - - -
Event nameInterfaceFired when...
icecandidatepairadd{{RTCIceCandidatePairEvent}} - The [= ICE agent =] has formed a candidate pair and is making it available to the script. -
icecandidatepairremove{{RTCIceCandidatePairEvent}} - The [= ICE agent =] has picked a candidate pair to remove, and unless the operation is canceled by invoking the preventDefault() method on the event, it will be removed. -
+ The encoding and decoding of (primarily video) frames can occasionally fail for a number of reasons. + In those cases the user agent may fallback from a hardware encoder/decoder to a software decoder with + lower performance or may loose to a hardware encoder/decoder without being able to fallback to software. + In such cases the application needs to be informed and take action such as renegotiation a different + set of codecs. +

This excludes issues like the loss of packets/slices in a frame or not receiving + a decodable frame for a certain amount of time that are typically handled by sending RTCP feedback + such as NACK or PLI to the other side. +

+

+
+

+ {{RTCRtpSender}} and RTCRtpReceiver interface extensions +

+
+
[Exposed=Window]
+partial interface RTCRtpSender {
+  attribute EventHandler error;
+};
+partial interface RTCRtpReceiver {
+  attribute EventHandler error;
+};
+
+
+
+

+ RTCRtpSender {{RTCRtpSender/error}} definition +

+

+ The {{RTCRtpSender/error}} event uses the {{RTCRtpSenderErrorEvent}} interface. +

+
+
[Exposed=Window]
+interface RTCRtpSenderErrorEvent : Event {
+  constructor(DOMString type, RTCRtpSenderErrorEventInit eventInitDict);
+  readonly attribute unsigned long? spatialIndex;
+  readonly attribute unsigned long rtpTimestamp;
+  readonly attribute unsigned short errorCode;
+  readonly attribute USVString errorText;
+};
+
+
+
+dictionary RTCRtpSenderErrorEventInit : EventInit {
+  unsigned long? spatialIndex;
+  unsigned long rtpTimestamp;
+  unsigned short errorCode;
+  USVString errorText;
+};
+
+

Dictionary RTCRtpSenderErrorEventInit Members

+
+
+ spatialIndex of type unsigned long, optional +
+
+

+ When simulcast is used, this is the spatial index of the layer on which the error occured. + Unset when simulcast is not used, unset for SVC. +

+
+
+ rtpTimestamp of type unsigned long, required +
+
+

+ The RTP timestamp that would have been associated with the frame if it had been sent over the network. +

+
+
+ errorCode of type unsigned short, required +
+
+

+ An implementation-specific numeric error code used to differentiate error causes. +

+
+
+ errorText of type USVString, required +
+
+

+ An implementation-specific human-readable description of the error. +

+
+
+
+
+
+
+

+ RTCRtpReceiver {{RTCRtpReceiver/error}} definition +

+

+ The {{RTCRtpReceiver/error}} event uses the {{RTCRtpReceiverErrorEvent}} interface. +

+
+
[Exposed=Window]
+interface RTCRtpReceiverErrorEvent : Event {
+  constructor(DOMString type, RTCRtpReceiverErrorEventInit eventInitDict);
+  readonly attribute unsigned long rtpTimestamp;
+  readonly attribute unsigned short errorCode;
+  readonly attribute USVString errorText;
+};
+
+
+
+dictionary RTCRtpReceiverErrorEventInit : EventInit {
+  unsigned long rtpTimestamp;
+  unsigned short errorCode;
+  USVString errorText;
+};
+
+

Dictionary RTCRtpReceiverErrorEventInit Members

+
+
+ rtpTimestamp of type unsigned long, required +
+
+

+ The RTP timestamp of the frame that caused the decode error. +

+
+
+ errorCode of type unsigned short, required +
+
+

+ An implementation-specific numeric error code used to differentiate error causes. +

+
+
+ errorText of type USVString, required +
+
+

+ An implementation-specific human-readable description of the error. +

+
+
+
+
+
+
+

Event summary

+

+ The following events fire on {{RTCRtpSender}} and {{RTCRtpReceiver}} objects:

+ + + + + + + + + + + + + + + + + + + + +
Event nameInterfaceFired when...
error{{RTCRtpSenderErrorEventInit}} + The encoder associated with the RTP sender encountered an error. +
error{{RTCRtpReceiverErrorEventInit}} + The decoder associated with the RTP receiver encountered an error. +
+