From b5b0fd346f097883cb8a7ef4b8bb58e3e42d313b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Fri, 26 Sep 2025 16:21:23 +0200 Subject: [PATCH 1/5] Add onssrcchange/oncsrcchange events to RTCRtpReceiver. --- index.html | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9f5042f..81b635b 100644 --- a/index.html +++ b/index.html @@ -1448,6 +1448,57 @@

+
+

+ {{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 more quickly 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 received. +

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

+ Whenever an RTP packet is received resulting in the most recent SSRC or CSRC + {{RTCRtpContributingSource/source}} identifier changing, 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 in response to the + same RTP packet, both events fire in the same queued task ensuring SSRC and CSRC information from the + same RTP packet is surfaced at the same time. +

+

+ 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 +1577,7 @@

Modifications to existing procedures

Event summary

-

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

+

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

@@ -1561,6 +1611,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

From 621b60497631d19344bbc29027afb592f4d9fa19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Mon, 29 Sep 2025 09:04:38 +0200 Subject: [PATCH 2/5] nit wording tweak --- index.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 81b635b..b1eebf4 100644 --- a/index.html +++ b/index.html @@ -1461,19 +1461,18 @@

By listening to these events, apps can react more quickly 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 received. + 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 an RTP packet is received resulting in the most recent SSRC or CSRC - {{RTCRtpContributingSource/source}} identifier changing, 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 in response to the - same RTP packet, both events fire in the same queued task ensuring SSRC and CSRC information from the - same RTP packet is surfaced at the same time. + Whenever the {{RTCRtpContributingSource/source}} identifier is updated based on the contents of an + RTP packet, 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 RTP packet, both events fire in + the same queued task ensuring both SSRC and CSRC information is exposed to the app at the same time.

Attributes From 46f46c2d740e014bea8bd7dc17f2a2d92369e6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Mon, 29 Sep 2025 09:09:04 +0200 Subject: [PATCH 3/5] nit: latest --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b1eebf4..da75daf 100644 --- a/index.html +++ b/index.html @@ -1468,8 +1468,8 @@

attribute EventHandler oncsrcchange; };

- Whenever the {{RTCRtpContributingSource/source}} identifier is updated based on the contents of an - RTP packet, the [= user agent =] MUST [= queue a task =] to [= fire an event =] named + Whenever the latest {{RTCRtpContributingSource/source}} identifier is updated based on the contents of + an RTP packet, 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 RTP packet, both events fire in the same queued task ensuring both SSRC and CSRC information is exposed to the app at the same time. From 155f72cad26a030df28f4c036c8afab7c379fcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Thu, 23 Oct 2025 12:46:29 +0200 Subject: [PATCH 4/5] Clarify decode --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index da75daf..0908423 100644 --- a/index.html +++ b/index.html @@ -1468,11 +1468,11 @@

attribute EventHandler oncsrcchange; };

- Whenever the latest {{RTCRtpContributingSource/source}} identifier is updated based on the contents of - an RTP packet, 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 RTP packet, both events fire in - the same queued task ensuring both SSRC and CSRC information is exposed to the app at the same time. + 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.

Attributes From 34e8a3259858be1692528f3aedf9f848e3f8076e Mon Sep 17 00:00:00 2001 From: henbos Date: Thu, 23 Oct 2025 16:11:47 +0200 Subject: [PATCH 5/5] Update index.html Co-authored-by: Jan-Ivar Bruaroey --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 0908423..420f9e7 100644 --- a/index.html +++ b/index.html @@ -1459,7 +1459,7 @@

{{RTCRtpReceiver/getSynchronizationSources()}} or {{RTCRtpReceiver/getContributingSources()}} changes.

- By listening to these events, apps can react more quickly to source changes than if they were polling + 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.