diff --git a/index.html b/index.html index 9f5042f..d452ccd 100644 --- a/index.html +++ b/index.html @@ -1448,6 +1448,66 @@

+
+

+ {{RTCRtpReceiver}} extensions +

+

+ The {{RTCRtpReceiver}} interface and {{RTCRtpContributingSource}} and {{RTCRtpSynchronizationSource}} + dictionaries are defined in [[WEBRTC]]. This document extends this interface by + adding two event handlers that fire when the {{RTCRtpContributingSource/source}} of + {{RTCRtpReceiver/getSynchronizationSources()}} or {{RTCRtpReceiver/getContributingSources()}} changes. +

+

+ By listening to these events, apps can react to source changes than if they were polling + these APIs, enabling the UX to be updated more quickly in response to virtual SSRCs changing which is + a common way for apps to keep track of which participant's media is currently being played out. +

+
partial interface RTCRtpReceiver {
+  attribute EventHandler onssrcchange;
+  attribute EventHandler oncsrcchange;
+};
+

+ Whenever the {{RTCRtpContributingSource/source}} identifier(s) are updated based on the last decoded + frame as defined here, the [= user agent =] + MUST append the following steps to the end of the same [=queue a task|queued task=]: +

+
    +
  1. +

    If the SSRC changed, [= fire an event =] named {{RTCRtpReceiver/ssrcchange}}.

    +
  2. +
  3. +

    If the CSRC changed, [= fire an event =] named {{RTCRtpReceiver/csrcchange}}.

    +
  4. +
+

+ By firing the events after both the SSRC and CSRC information has been updated, both changes are + observable at the time that the first event fires. +

+

+ Attributes +

+
+
+ onssrcchange of type {{EventHandler}} +
+
+

+ Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getSynchronizationSources()}} + changes, see above. +

+
+
+ oncsrcchange of type {{EventHandler}} +
+
+

+ Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getContributingSources()}} + changes, see above. +

+
+
+

Disabling hardware acceleration

@@ -1526,8 +1586,7 @@

Modifications to existing procedures

Event summary

-

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

+

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

@@ -1561,6 +1620,32 @@

Event summary

+

The following events fire on {{RTCRtpReceiver}} objects:

+ + + + + + + + + + + + + + + + + + + + +
Event nameInterfaceFired when...
ssrcchange{{Event}} + The SSRC identifier changed in response to an RTP packet. +
csrcchange{{Event}} + The CSRC identifier changed in response to an RTP packet. +

Timestamp behavior