Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,21 @@ spec:webidl; type:dfn; text:resolve
"href": "https://datatracker.ietf.org/doc/draft-ietf-avtcore-abs-capture-time/",
"title": "RTP Header Extension for Absolute Capture Time",
"publisher": "IETF"
},
"RTP-SFRAME-PAYLOAD": {
"href": "https://datatracker.ietf.org/doc/draft-ietf-avtcore-rtp-sframe/",
"title": "RTP Payload Format for SFrame",
"publisher": "IETF"
}
}
</pre>
<pre class=link-defaults>
spec:streams; type:interface; text:ReadableStream
spec:infra; type:dfn; text:list
</pre>
<pre class=anchors>
url: https://w3c.github.io/webrtc-pc/#dfn-check-if-negotiation-is-needed; text: check the negotiation-needed flag; type: dfn; spec: WEBRTC
</pre>

# Introduction # {#introduction}

Expand Down Expand Up @@ -119,6 +127,17 @@ the original frame.

## Extension operation ## {#operation}

At construction of each {{RTCRtpTransceiver}}, run the following steps:
Comment thread
youennf marked this conversation as resolved.
1. If [=this=] is associated with a media description, initialize [=this=].`[[useSFrame]]` from the media description. If [=this=].`[[useSFrame]]` is true, enable SFrame RTP packetization for [=this=].
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How this would apply for the frame/packet encryption? For frame level encryption suggested algorithm looks good.

Could you explain how this would change in the future for packet level sframe?
Since then you won't be able to tell based on sdp if encryption should be frame or packet, and for packet level encryption you want to use media specific packetization.

1. Otherwise, [=queue a task=] to run the following steps:
1. If [=this=].`[[useSFrame]]` is undefined, set [=this=].`[[useSFrame]]` to false.

<p class=note>
{{RTCRtpTransceiver}}.`[[useSFrame]]` should be set either synchronously, in case it is already tied to a SDP m-section, or asynchronously, before it is associated to a SDP m-section.
This ensures that {{RTCRtpTransceiver}}.`[[useSFrame]]` and the corresponding SDP are always synchronized.
By doing so, the handling related to the negotiation-needed flag, like the [=check the negotiation-needed flag=] algorithm, do not need to take into account {{RTCRtpTransceiver}}.`[[useSFrame]]`.
Comment thread
youennf marked this conversation as resolved.
Outdated
</p>

At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the following steps:
1. Initialize [=this=].`[[transform]]` to null.
1. Initialize [=this=].`[[pipeToController]]` to null.
Expand Down Expand Up @@ -188,6 +207,15 @@ and a <dfn abstract-op for=RTCRtpTransform>disassociation algorithm</dfn>, both
The <dfn attribute for="RTCRtpSender,RTCRtpReceiver">transform</dfn> getter steps are to
return [=this=].`[[transform]]`. The setter steps are:
1. Let |transform| be the argument to the setter.
1. Let |transceiver| be the {{RTCRtpTransceiver}} associated to [=this=].
1. If |transform|.`[[useSFrame]]` is true, run the following steps:
1. If |transceiver|.`[[useSFrame]]` is false, throw a {{InvalidModificationError}} and abort these steps.
1. Otherwise, if |transceiver|.`[[useSFrame]]` is undefined, run the following steps:
1. Set |transceiver|.`[[useSFrame]]` to true.
1. Enable SFrame RTP packetization for |transceiver|.
1. Otherwise, run the following steps:
1. If |transceiver|.`[[useSFrame]]` is true, throw a {{InvalidModificationError}} and abort these steps.
1. Set |transceiver|.`[[useSFrame]]` to false.
Comment on lines +217 to +219
Copy link
Copy Markdown

@k-wasniowski k-wasniowski Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@youennf I don't remember what was the outcome of the W3C meeting in which disabling sframe was discussed. It was supposed to be possible to disable a sframe on the transceiver? Or rather if transceiver have once initiated sframe, it must remain in this state?

If the outcome was that we should be able to disable sframe for transceiver, the steps here shouldn't mention that both sender/receiver transforms should be set to null?

Also what would be the way for the RTCRtpTransceiver to disable sframe, which was negotiated via SDP, and doesnt have any transforms attached (both are null).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was discussed during https://www.w3.org/2025/10/21-webrtc-minutes#981d
It seems easier to have a strict setup at first, to not have to deal with rollback et al.
When web app creates transceiver, web app has some limited amount of time to select sframe packetization or not.
Applications can create two transceivers, one with sframe and the other without, and switch between the two to send/receive media.

1. If |transform| is not null and |transform|.`[[owner]]` is not null, throw a {{InvalidStateError}} and abort these steps.
1. Set |transform|.`[[owner]]` to [=this=].
1. Let |oldTransform| be [=this=].`[[transform]]`.
Expand Down Expand Up @@ -289,11 +317,13 @@ The <dfn constructor for="RTCSFrameSenderTransform" lt="RTCSFrameSenderTransform
1. Let |options| be the method's first argument.
1. Run the [=SFrame initialization algorithm=] with |this| and |options|.
1. Set |this|.`[[role]]` to 'encrypt'.
1. Set |this|.`[[useSFrame]]` to true.

The <dfn constructor for="RTCSFrameReceiverTransform" lt="RTCSFrameReceiverTransform(options)"><code>new RTCSFrameReceiverTransform(<var>options</var>)</code></dfn> constructor steps are:
1. Let |options| be the method's first argument.
1. Run the [=SFrame initialization algorithm=] with |this| and |options|.
1. Set |this|.`[[role]]` to 'decrypt'.
1. Set |this|.`[[useSFrame]]` to true.

The <dfn constructor for="SFrameEncrypterStream" lt="SFrameEncrypterStream(options)"><code>new SFrameEncrypterStream(<var>options</var>)</code></dfn> constructor steps are:
1. Let |options| be the method's first argument.
Expand Down
Loading