diff --git a/index.html b/index.html index 9f5042f..d452ccd 100644 --- a/index.html +++ b/index.html @@ -1448,6 +1448,66 @@
+ 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=]: +
+If the SSRC changed, [= fire an event =] named {{RTCRtpReceiver/ssrcchange}}.
+If the CSRC changed, [= fire an event =] named {{RTCRtpReceiver/csrcchange}}.
++ 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. +
++ Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getSynchronizationSources()}} + changes, see above. +
++ Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getContributingSources()}} + changes, see above. +
+@@ -1526,8 +1586,7 @@
- The following events fire on {{RTCIceTransport}} objects:
+The following events fire on {{RTCIceTransport}} objects:
The following events fire on {{RTCRtpReceiver}} objects:
+| Event name | +Interface | +Fired 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. + | +