diff --git a/index.bs b/index.bs index 75dea47..cf46ccd 100644 --- a/index.bs +++ b/index.bs @@ -279,7 +279,7 @@ enum RTCEncodedVideoFrameType {
Enum value | Description | @@ -534,7 +534,7 @@ interface RTCRtpScriptTransformer { readonly attribute ReadableStream readable; readonly attribute WritableStream writable; readonly attribute any options; - Promise<unsigned long long> generateKeyFrame(optional DOMString rid); + Promise<undefined> generateKeyFrame(optional sequence<DOMString> rids); Promise<undefined> sendKeyFrameRequest(); }; @@ -575,14 +575,14 @@ Each RTCRtpScriptTransform has the following set of [=association steps=], given 1. Set |transformer|.`[[encoder]]` to |encoder|. 1. Set |transformer|.`[[depacketizer]]` to |depacketizer|. -The generateKeyFrame(|rid|) method steps are: +The generateKeyFrame(|rids|) method steps are: 1. Let |promise| be a new promise. -1. Run the [=generate key frame algorithm=] with |promise|, |this|.`[[encoder]]` and |rid|. +1. [=In parallel=], run the [=generate key frame algorithm=] with |promise|, the {{RTCRtpSender}} associated with |this|.`[[encoder]]` and |rids|. 1. Return |promise|. The sendKeyFrameRequest() method steps are: 1. Let |promise| be a new promise. -1. Run the [=send request key frame algorithm=] with |promise| and |this|.`[[depacketizer]]`. +1. [=In parallel=], run the [=send request key frame algorithm=] with |promise| and |this|.`[[depacketizer]]`. 1. Return |promise|. ## Attributes ## {#RTCRtpScriptTransformer-attributes} @@ -602,37 +602,12 @@ The writable getter steps are ## KeyFrame Algorithms ## {#KeyFrame-algorithms} -The generate key frame algorithm, given |promise|, |encoder| and |rid|, is defined by running these steps: -1. If |encoder| is undefined, reject |promise| with {{InvalidStateError}}, abort these steps. -1. If |encoder| is not processing video frames, reject |promise| with {{InvalidStateError}}, abort these steps. -1. If |rid| is defined, validate its value. If invalid, reject |promise| with {{NotAllowedError}} and abort these steps. -1. [=In parallel=], run the following steps: - 1. Gather a list of video encoders, named |videoEncoders| from |encoder|, ordered according negotiated RIDs if any. - 1. If |rid| is defined, remove from |videoEncoders| any video encoder that does not match |rid|. - 1. If |rid| is undefined, remove from |videoEncoders| all video encoders except the first one. - 1. If |videoEncoders| is empty, reject |promise| with {{NotFoundError}} and abort these steps. - |videoEncoders| is expected to be empty if the corresponding {{RTCRtpSender}} is not active, or the corresponding {{RTCRtpSender}} track is ended. - 1. Let |videoEncoder| be the first encoder in |videoEncoders|. - 1. If |rid| is undefined, set |rid| to the RID value corresponding to |videoEncoder|. - 1. Create a pending key frame task called |task| with |task|.`[[rid]]` set to rid and |task|.`[[promise]]`| set to |promise|. - 1. If |encoder|.`[[pendingKeyFrameTasks]]` is undefined, initialize |encoder|.`[[pendingKeyFrameTasks]]` to an empty set. - 1. Let |shouldTriggerKeyFrame| be
---|