Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add audioConstantBitRate flag to MediaRecorderOptions. #185

Merged
merged 7 commits into from Feb 4, 2020
27 changes: 27 additions & 0 deletions MediaRecorder.bs
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,8 @@ dictionary MediaRecorderOptions {
unsigned long audioBitsPerSecond;
unsigned long videoBitsPerSecond;
unsigned long bitsPerSecond;
BitrateMode audioBitrateMode;
BitrateMode videoBitrateMode;
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
};
</pre>

Expand Down Expand Up @@ -610,8 +612,33 @@ dictionary MediaRecorderOptions {
{{MediaRecorderOptions/audioBitsPerSecond}} or
{{MediaRecorderOptions/videoBitsPerSecond}} if present, and might be
distributed among the present track encoders as the UA sees fit.</dd>

<dt><dfn dict-member for="MediaRecorderOptions"><code>audioBitrateMode</code></dfn></dt>
<dd>Specifes the {{BitrateMode}} that should be used to encode the Audio track(s).</dd>
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved

<dt><dfn dict-member for="MediaRecorderOptions"><code>videoBitrateMode</code></dfn></dt>
<dd>Specifes the {{BitrateMode}} that should be used to encode the Video track(s).</dd>
</dl>

## BitrateMode ## {#bitratemode}

<pre class="idl">
enum BitrateMode {
"cbr",
"vbr"
};
</pre>

### Values ### {#bitratemode-values}

<dl class="domintro">
<dt><dfn enum-value for="BitrateMode"><code>cbr</code></dfn></dt>
<dd>Encode at a constant bitrate.</dd>

<dt><dfn enum-value for="BitrateMode"><code>vbr</code></dfn></dt>
<dd>Encode using a variable bitrate, allowing more space to be used for complex signals
and less space for less complex signals.</dd>
</dl>

## RecordingState ## {#recordingstate}

Expand Down