@@ -885,6 +885,10 @@ partial interface DedicatedWorkerGlobalScope {
885
885
attribute EventHandler onrtctransform;
886
886
};
887
887
888
+ interface mixin KeyFrameRequest {
889
+ Promise<undefined> generateKeyFrame(optional sequence<DOMString> rids);
890
+ };
891
+
888
892
[Exposed=DedicatedWorker]
889
893
interface RTCRtpScriptTransformer : EventTarget {
890
894
// Attributes and methods related to the transformer source
@@ -897,6 +901,7 @@ interface RTCRtpScriptTransformer : EventTarget {
897
901
// Attributes for configuring the Javascript code
898
902
readonly attribute any options;
899
903
};
904
+ RTCRtpScriptTransformer includes KeyFrameRequest;
900
905
901
906
[Exposed=Window]
902
907
interface RTCRtpScriptTransform {
@@ -941,11 +946,6 @@ Each RTCRtpScriptTransform has the following set of [$association steps$], given
941
946
1. Set |transformer|.`[[encoder]] ` to |encoder|.
942
947
1. Set |transformer|.`[[depacketizer]] ` to |depacketizer|.
943
948
944
- The <dfn method for="RTCRtpScriptTransform">generateKeyFrame(|rid|)</dfn> method steps are:
945
- 1. Let |promise| be a new promise.
946
- 1. Run the [$generate key frame algorithm$] with |promise|, |this|.`[[encoder]] ` and |rid|.
947
- 1. Return |promise|.
948
-
949
949
The <dfn method for="RTCRtpScriptTransform">sendKeyFrameRequest()</dfn> method steps are:
950
950
1. Let |promise| be a new promise.
951
951
1. Run the [$send request key frame algorithm$] with |promise| and |this|.`[[depacketizer]] `.
@@ -988,6 +988,13 @@ or Full Intra Refresh (FIR), queue a task to perform the following steps:
988
988
1. If the event's [=Event/canceled flag=] is true, abort these steps.
989
989
1. Run the [$generate key frame algorithm$] with a new promise, |transform|.`[[encoder]] ` and |rid|.
990
990
991
+ ## KeyFrameRequest Operations ## {#KeyFrameRequest-operations}
992
+
993
+ The <dfn method for="KeyFrameRequest">generateKeyFrame(|rid|)</dfn> method steps are:
994
+ 1. Let |promise| be a new promise.
995
+ 1. Run the [$generate key frame algorithm$] with |promise|, |this|.`[[encoder]] ` and |rid|.
996
+ 1. Return |promise|.
997
+
991
998
## KeyFrame Algorithms ## {#KeyFrame-algorithms}
992
999
993
1000
The <dfn abstract-op>generate key frame algorithm</dfn> , given |promise|, |encoder| and |rid|, is defined by running these steps:
@@ -1038,19 +1045,9 @@ The <dfn abstract-op>send request key frame algorithm</dfn>, given |promise| and
1038
1045
An additional API on {{RTCRtpSender}} is added to complement the generation of key frame added to {{RTCRtpScriptTransformer}} .
1039
1046
1040
1047
<pre class="idl">
1041
- partial interface RTCRtpSender {
1042
- Promise<undefined> generateKeyFrame(optional sequence <DOMString> rids);
1043
- };
1048
+ RTCRtpSender includes KeyFrameRequest;
1044
1049
</pre>
1045
1050
1046
- ## Extension operation ## {#sender-operation}
1047
-
1048
- The <dfn method for="RTCRtpSender">generateKeyFrame(|rids|)</dfn> method steps are:
1049
-
1050
- 1. Let |promise| be a new promise.
1051
- 1. [=In parallel=] , run the [$generate key frame algorithm$] with |promise|, |this|'s encoder and |rids|.
1052
- 1. Return |promise|.
1053
-
1054
1051
# Privacy and security considerations # {#privacy}
1055
1052
1056
1053
This API gives Javascript access to the content of media streams. This
0 commit comments