Skip to content

Commit aff3004

Browse files
committed
Add event and function descriptions
1 parent 9aaa03f commit aff3004

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

index.bs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,16 @@ RTCRtpScriptTransformer includes RTCRtpScriptSink;
619619
interface RTCRtpScriptTransform {
620620
constructor(Worker worker, optional any options, optional sequence<object> transfer);
621621
};
622+
623+
interface BandwidthEstimateEvent : Event {
624+
constructor(DOMString type, BandwidthInfo info);
625+
readonly attribute BandwidthInfo bandwidthInfo;
626+
};
627+
628+
interface KeyFrameRequestEvent : Event {
629+
constructor(DOMString type, optional DOMString rid);
630+
readonly attribute DOMString? rid;
631+
};
622632
</pre>
623633

624634
## Operations ## {#RTCRtpScriptTransform-operations}
@@ -652,16 +662,19 @@ Each RTCRtpScriptTransform has the following set of [$association steps$], given
652662
1. Set |transformer|.`[[encoder]]` to |encoder|.
653663
1. Set |transformer|.`[[depacketizer]]` to |depacketizer|.
654664

655-
The <dfn method for="RTCRtpScriptTransformer">generateKeyFrame(|rid|)</dfn> method steps are:
665+
The <dfn method for="RTCRtpScriptSource">generateKeyFrame(|rid|)</dfn> method steps are:
656666
1. Let |promise| be a new promise.
657667
1. Run the [$generate key frame algorithm$] with |promise|, |this|.`[[encoder]]` and |rid|.
658668
1. Return |promise|.
659669

660-
The <dfn method for="RTCRtpScriptTransformer">sendKeyFrameRequest()</dfn> method steps are:
670+
The <dfn method for="RTCRtpScriptSource">sendKeyFrameRequest()</dfn> method steps are:
661671
1. Let |promise| be a new promise.
662672
1. Run the [$send request key frame algorithm$] with |promise| and |this|.`[[depacketizer]]`.
663673
1. Return |promise|.
664674

675+
The <dfn method for="RTCRtpScriptSource">bandwidthEstimate()</dfn> method step are:
676+
1. Configure the upstream source with the new bandwidth information.
677+
665678
## Attributes ## {#RTCRtpScriptTransformer-attributes}
666679

667680
A {{RTCRtpScriptTransformer}} has the following private slots called `[[depacketizer]]`, `[[encoder]]`, `[[options]]`, `[[readable]]` and `[[writable]]`.
@@ -671,12 +684,25 @@ This allows algorithms to go from an {{RTCRtpScriptTransformer}} object to its {
671684
The <dfn attribute for="RTCRtpScriptTransformer">options</dfn> getter steps are:
672685
1. Return [=this=].`[[options]]`.
673686

674-
The <dfn attribute for="RTCRtpScriptTransformer">readable</dfn> getter steps are:
687+
The <dfn attribute for="RTCRtpScriptSource">readable</dfn> getter steps are:
675688
1. Return [=this=].`[[readable]]`.
676689

677-
The <dfn attribute for="RTCRtpScriptTransformer">writable</dfn> getter steps are:
690+
The <dfn attribute for="RTCRtpScriptSink">writable</dfn> getter steps are:
678691
1. Return [=this=].`[[writable]]`.
679692

693+
The <dfn attribute for="RTCRtpScriptSink">onbandwidthestimate</dfn> EventHandler has type bandwidthestimate.
694+
695+
The <dfn attribute for="RTCRtpScriptSink">onkeyframerequest</dfn> EventHandler has type keyframerequest.
696+
697+
## Events ##
698+
699+
The following events fire on an RTCRtpScriptTransform:
700+
701+
* bandwidthestimate of type {{BandwidthEstimateEvent}} - fired when the sink determines that the bandwidth estimate has changed significantly from what has been previously signalled. In the context of {{RTCRtpScriptTransform}}, if the event is not cancelled, the information will be passed to the source as if the bandwidthEstimate() function had been called.
702+
703+
* keyframerequest of type {{KeyFrameRequestEvent}} - fired when the sink determines that a key frame has been requested. In the context of {{RTCRtpScriptTransform, if the event is not cancelled, the information will be passed to the source as if the generateKeyFrame() function had been called. <!-- NOTE IN DRAFT: generateKeyFrame() and requestKeyFrame() should merge -->
704+
705+
680706
## KeyFrame Algorithms ## {#KeyFrame-algorithms}
681707
682708
The <dfn abstract-op>generate key frame algorithm</dfn>, given |promise|, |encoder| and |rid|, is defined by running these steps:

0 commit comments

Comments
 (0)