diff --git a/index.html b/index.html index 9f5042f..420f9e7 100644 --- a/index.html +++ b/index.html @@ -1448,6 +1448,56 @@
+ 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 is updated based on the last decoded frame, + the [= user agent =] MUST [= queue a task =] to [= fire an event =] named {{RTCRtpReceiver/ssrcchange}} + if the SSRC changed and an event named {{RTCRtpReceiver/csrcchange}} if the CSRC changed. If both + identifiers are changed based on the same decoded frame, both events fire in the same queued task. This + ensures that both SSRC and CSRC information is exposed to the app at the same time. +
++ Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getSynchronizationSources()}} + changes, see above. +
++ Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getContributingSources()}} + changes, see above. +
+@@ -1526,8 +1576,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. + | +