Conversation
fc2dc23 to
844101b
Compare
| 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: |
There was a problem hiding this comment.
@youennf Will ever useSFrame be undefined? Following the steps from the RTCRtpTransceiver initialization, it's always initialized to true/false from the sdp.
Otherwise, [=queue a task=] to run the following steps:
1. If [=this=].`[[useSFrame]]` is undefined, set [=this=].`[[useSFrame]]` to false.
Which makes me think that we will actually always set it to false?
There was a problem hiding this comment.
The first commit of this PR should be reviewed separately at #252. This PR is really only about the second commit.
The principle is the following:
- If a transceiver is created via
addTransceiveroraddTrack,useSFrameis initially undefined so that the web app can set the transform in the current event loop task. - If a transceiver is created by applying a remote description,
useSFrameis initialised according the description.
844101b to
63ee677
Compare
| [Exposed=Window] | ||
| interface RTCSFrameSenderTransform { | ||
| constructor(optional RTCSFrameTransformOptions options = {}); | ||
| constructor(optional RTCSFrameSenderTransformOptions options = {}); |
There was a problem hiding this comment.
@youennf
Should there be a requirement that for sender packet transformers should be applied after frame transformers?
In theory you could create RTCRtpScriptTransform with couple transformers attached like:
onrtctransform = transformer => {
const encrypter = new RTCSFrameSenderTransform({mode: `packet`);
transformer.readable
.pipeThrough(new TransformStream(myMetadataTransform1))
.pipeThrough(encrypter)
.pipeThrough(new TransformStream(myMetadataTransform2))
.pipeTo(writable);
};
Where myMetadataTransformX should work on the frame level transformations
There was a problem hiding this comment.
RTCSFrameSenderTransform can only be used on RTCRtpSender, not as part of regular whatwg streams.
63ee677 to
e5513d5
Compare
e5513d5 to
73803fb
Compare
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
SHA: 5d2c82e Reason: push, by youennf Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #292
Preview | Diff