Skip to content

Commit 74318f6

Browse files
committed
Make sure that writeEncodedData returns a promise
1 parent c775c50 commit 74318f6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

index.bs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,13 @@ The <dfn>readEncodedData</dfn> algorithm is given a |rtcObject| as parameter. It
196196
4. [=ReadableStream/enqueue=] |frame| in |rtcObject|.`[[readable]]`.
197197

198198
The <dfn>writeEncodedData</dfn> algorithm is given a |rtcObject| as parameter and a |frame| as input. It is defined by running the following steps:
199-
1. If |frame|.`[[owner]]` is not equal to |rtcObject|, abort these steps. A processor cannot create frames, or move frames between streams.
200-
2. If the |frame|'s {{RTCEncodedVideoFrame/timestamp}} is equal to or larger than |rtcObject|.`[[lastReceivedFrameTimestamp]]`, abort these steps. A processor cannot reorder frames, although it may delay them or drop them.
199+
1. If |frame|.`[[owner]]` is not equal to |rtcObject|, abort these steps and return [=a promise resolved with=] undefined. A processor cannot create frames, or move frames between streams.
200+
2. If the |frame|'s {{RTCEncodedVideoFrame/timestamp}} is equal to or larger than |rtcObject|.`[[lastReceivedFrameTimestamp]]`, abort these steps and return [=a promise resolved with=] undefined. A processor cannot reorder frames, although it may delay them or drop them.
201201
3. Set |rtcObject|.`[[lastReceivedFrameTimestamp]]` to the |frame|'s {{RTCEncodedVideoFrame/timestamp}}.
202-
4. Process the frame as if it came directly from the encoded data source:
203-
* If |rtcObject| is a {{RTCRtpSender}}, enqueue it |rtcObject|'s packetizer.
202+
4. Process the frame as if it came directly from the encoded data source, by running the following steps [=in parallel=]:
203+
* If |rtcObject| is a {{RTCRtpSender}}, enqueue it to |rtcObject|'s packetizer.
204204
* If |rtcObject| is a {{RTCRtpReceiver}}, enqueue it to |rtcObject|'s decoder.
205+
5. Return [=a promise resolved with=] undefined.
205206

206207
## Extension attribute ## {#attribute}
207208

0 commit comments

Comments
 (0)