Skip to content
Merged
Changes from 4 commits
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
22 changes: 20 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -914,9 +914,20 @@ Their [=deserialization steps=], given |serialized|, |value| and |realm|, are:

# <dfn interface>RTCRtpScriptTransform</dfn> interface # {#RTCRtpScriptTransform-interface}
<pre class="idl">
enum RTCRtpScriptTransformType {
"sframe"
};

dictionary WorkerAndParameters {
required Worker worker;
RTCRtpScriptTransformType type;
};

typedef (Worker or WorkerAndParameters) WorkerOrWorkerAndParameters;

[Exposed=Window]
interface RTCRtpScriptTransform {
constructor(Worker worker, optional any options, optional sequence&lt;object&gt; transfer);
constructor(WorkerOrWorkerAndParameters workerOrWorkerAndParameters, optional any options, optional sequence&lt;object&gt; transfer);
};
</pre>

Expand All @@ -941,10 +952,17 @@ An {{RTCRtpScriptTransform}} object has the following internal slot:

## Constructor ## {#RTCRtpScriptTransform-constructor}

The <dfn constructor for="RTCRtpScriptTransform" lt="RTCRtpScriptTransform(worker, options)"><code>new RTCRtpScriptTransform(|worker|, |options|, |transfer|)</code></dfn> constructor steps are:
The <dfn constructor for="RTCRtpScriptTransform" lt="RTCRtpScriptTransform(workerAndOptionalParameters, options, transfer)"><code>new RTCRtpScriptTransform(|workerAndOptionalParameters|, |options|, |transfer|)</code></dfn> constructor steps are:
Comment thread
youennf marked this conversation as resolved.
Outdated
1. Let |worker| be undefined.
1. Let |useSFrame| be undefined.
1. If |workerAndOptionalParameters| is a {{Worker}} object, set |worker| to |workerAndOptionalParameters| and |useSFrame| to false.
Comment thread
youennf marked this conversation as resolved.
Outdated
1. Otherwise, run the following substeps:
1. Set |worker| to |workerAndOptionalParameters|["worker"].
Comment thread
youennf marked this conversation as resolved.
Outdated
1. Set |useSFrame| to true if |workerAndOptionalParameters|["type"] is "sframe" and false otherwise.
Comment thread
youennf marked this conversation as resolved.
Outdated
1. Initialize [=this=]'s internal slot as follows:
: {{RTCRtpScriptTransform/[[worker]]}}
:: |worker|
1. Initialize [=this=].`[[useSFrame]]` to |useSFrame|.
1. Let |serializedOptions| be the result of [$StructuredSerializeWithTransfer$](|options|, |transfer|).
1. [=Queue a global task=] on the DOM manipulation [=task source=] with |worker|'s
{{WorkerGlobalScope}} to run the following steps:
Expand Down
Loading