-
Notifications
You must be signed in to change notification settings - Fork 18
Add onssrcchange/oncsrcchange events to RTCRtpReceiver #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1448,6 +1448,56 @@ <h2> | |
| </section> | ||
| </section> | ||
| </section> | ||
| <section id="source-change-event"> | ||
| <h2> | ||
| {{RTCRtpReceiver}} extensions | ||
| </h2> | ||
| <p> | ||
| 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. | ||
| </p> | ||
| <p> | ||
| 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 played out. | ||
| </p> | ||
| <pre class="idl">partial interface RTCRtpReceiver { | ||
| attribute EventHandler onssrcchange; | ||
| attribute EventHandler oncsrcchange; | ||
| };</pre> | ||
| <p> | ||
| 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}} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the same queued task ... append the following steps at the end: 1. fire ssrcchange if changed, 2. fire csrcchange if changed |
||
| 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. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. at the time of the first event |
||
| </p> | ||
| <h3> | ||
| Attributes | ||
| </h3> | ||
| <dl data-link-for="RTCRtpReceiver" data-dfn-for="RTCRtpReceiver" class="attributes"> | ||
| <dt> | ||
| <dfn id="dom-rtptransceiver-onssrcchange">onssrcchange</dfn> of type {{EventHandler}} | ||
| </dt> | ||
| <dd> | ||
| <p> | ||
| Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getSynchronizationSources()}} | ||
| changes, see above. | ||
| </p> | ||
| </dd> | ||
| <dt> | ||
| <dfn id="dom-rtptransceiver-oncsrcchange">oncsrcchange</dfn> of type {{EventHandler}} | ||
| </dt> | ||
| <dd> | ||
| <p> | ||
| Fired when the {{RTCRtpContributingSource/source}} in {{RTCRtpReceiver/getContributingSources()}} | ||
| changes, see above. | ||
| </p> | ||
| </dd> | ||
| </dl> | ||
| </section> | ||
| <section id="disable-hardware"> | ||
| <h2>Disabling hardware acceleration</h2> | ||
| <p> | ||
|
|
@@ -1526,8 +1576,7 @@ <h3>Modifications to existing procedures</h3> | |
| </section> | ||
| <section class="informative"> | ||
| <h2>Event summary</h2> | ||
| <p> | ||
| The following events fire on {{RTCIceTransport}} objects:</p> | ||
| <p>The following events fire on {{RTCIceTransport}} objects:</p> | ||
| <table class="simple"> | ||
| <thead> | ||
| <tr> | ||
|
|
@@ -1561,6 +1610,32 @@ <h2>Event summary</h2> | |
| </tr> | ||
| </tbody> | ||
| </table> | ||
| <p>The following events fire on {{RTCRtpReceiver}} objects:</p> | ||
| <table class="simple"> | ||
| <thead> | ||
| <tr> | ||
| <th>Event name</th> | ||
| <th>Interface</th> | ||
| <th>Fired when...</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr> | ||
| <th scope=row><dfn data-dfn-for="RTCRtpReceiver" data-dfn-type=event>ssrcchange</dfn></th> | ||
| <td>{{Event}}</td> | ||
| <td> | ||
| The SSRC identifier changed in response to an RTP packet. | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <th scope=row><dfn data-dfn-for="RTCRtpReceiver" data-dfn-type=event>csrcchange</dfn></th> | ||
| <td>{{Event}}</td> | ||
| <td> | ||
| The CSRC identifier changed in response to an RTP packet. | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </section> | ||
| <section> | ||
| <h2>Timestamp behavior</h2> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.