You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -795,12 +805,12 @@ Each RTCRtpScriptTransform has the following set of [$association steps$], given
795
805
1. Set |transformer|.`[[encoder]]` to |encoder|.
796
806
1. Set |transformer|.`[[depacketizer]]` to |depacketizer|.
797
807
798
-
The <dfn method for="RTCRtpScriptTransformer">generateKeyFrame(|rid|)</dfn> method steps are:
808
+
The <dfn method for="RTCRtpScriptTransform">generateKeyFrame(|rid|)</dfn> method steps are:
799
809
1. Let |promise| be a new promise.
800
810
1. Run the [$generate key frame algorithm$] with |promise|, |this|.`[[encoder]]` and |rid|.
801
811
1. Return |promise|.
802
812
803
-
The <dfn method for="RTCRtpScriptTransformer">sendKeyFrameRequest()</dfn> method steps are:
813
+
The <dfn method for="RTCRtpScriptTransform">sendKeyFrameRequest()</dfn> method steps are:
804
814
1. Let |promise| be a new promise.
805
815
1. Run the [$send request key frame algorithm$] with |promise| and |this|.`[[depacketizer]]`.
806
816
1. Return |promise|.
@@ -814,12 +824,34 @@ This allows algorithms to go from an {{RTCRtpScriptTransformer}} object to its {
814
824
The <dfn attribute for="RTCRtpScriptTransformer">options</dfn> getter steps are:
815
825
1. Return [=this=].`[[options]]`.
816
826
817
-
The <dfn attribute for="RTCRtpScriptTransformer">readable</dfn> getter steps are:
827
+
The <dfn attribute for="RTCRtpScriptTransform">readable</dfn> getter steps are:
818
828
1. Return [=this=].`[[readable]]`.
819
829
820
-
The <dfn attribute for="RTCRtpScriptTransformer">writable</dfn> getter steps are:
830
+
The <dfn attribute for="RTCRtpScriptTransform">writable</dfn> getter steps are:
821
831
1. Return [=this=].`[[writable]]`.
822
832
833
+
The <dfn attribute for="RTCRtpScriptTransform">onbandwidthestimate</dfn> EventHandler has type bandwidthestimate.
834
+
835
+
The <dfn attribute for="RTCRtpScriptTransform">onkeyframerequest</dfn> EventHandler has type keyframerequest.
836
+
837
+
## Events ## {#RTCRtpScriptTransformer-events}
838
+
839
+
The following event fires on an {{RTCRtpScriptTransformer}}:
840
+
841
+
* keyframerequest of type {{KeyFrameRequestEvent}} - fired when the sink determines that a key frame has been requested.
842
+
843
+
The steps that generate an event of type {{KeyFrameRequestEvent}} are as follows:
844
+
845
+
Given a {{RTCRtpScriptTransformer}} |transform|:
846
+
847
+
When |transform|'s `[[encoder]]` receives a keyframe request, for instance from an incoming RTCP Picture Loss Indication (PLI)
848
+
or Full Intra Refresh (FIR), queue a task to perform the following steps:
849
+
850
+
1. Set |rid| to the RID of the appropriate layer, or undefined if the request is not for a specific layer.
851
+
1. [=Fire an event=] named `keyframerequest` at |transform| using {{KeyFrameRequestEvent}} with its {{Event/cancelable}} attribute initialized to "true", and with {{KeyFrameRequestEvent/rid}} set to |rid|.
852
+
1. If the event's [=Event/canceled flag=] is true, abort these steps.
853
+
1. Run the [$generate key frame algorithm$] with a new promise, |transform|.`[[encoder]]` and |rid|.
854
+
823
855
## KeyFrame Algorithms ## {#KeyFrame-algorithms}
824
856
825
857
The <dfn abstract-op>generate key frame algorithm</dfn>, given |promise|, |encoder| and |rid|, is defined by running these steps:
0 commit comments