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 a new webrtcCodec parameter to MediaCapabilitiesInfo #186

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,12 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
required boolean supported;
required boolean smooth;
required boolean powerEfficient;
WebRTCMediaCapabilitiesInfo webrtc;
};

dictionary WebRTCMediaCapabilitiesInfo {
RTCRtpCodecCapability audio;
RTCRtpCodecCapability video;
};
</pre>

Expand All @@ -783,7 +789,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
for='MediaCapabilitiesInfo'>supported</dfn>, <dfn dict-member
for='MediaCapabilitiesInfo'>smooth</dfn>, <dfn dict-member
for='MediaCapabilitiesInfo'>powerEfficient</dfn> fields which are
booleans.
booleans, and an associated optional <dfn dict-member
for='MediaCapabilitiesInfo'>webrtc</dfn> of type
{{WebRTCMediaCapabilitiesInfo}}.
</p>

<p class='note'>
Expand All @@ -795,6 +803,11 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
temperature or the fans noise.
</p>

<p class='note'>
Authors can use {{MediaCapabilitiesInfo/webrtc}} to set up their
preferred WebRTC codecs using the {{RTCRtpTransceiver/setCodecPreferences}} API.
</p>

<p>
A {{MediaCapabilitiesDecodingInfo}} has associated
<dfn dict-member for=MediaCapabilitiesDecodingInfo>keySystemAccess</dfn>
Expand Down Expand Up @@ -867,6 +880,25 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
source has side effects such as enabling different encoding
modules.
</li>
<li>
If the user agent is able to encode the media represented by
chrisn marked this conversation as resolved.
Show resolved Hide resolved
<var>configuration</var> and <var>configuration</var> has a type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we link "type" explicitly to a config member?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "valid audio MIME type" and "valid video MIME type" from section 2.1.4 are probably good targets.

of {{MediaEncodingType/webrtc}}, run the following substeps:
chrisn marked this conversation as resolved.
Show resolved Hide resolved
<ol>
<li>Let <var>webrtc</var> be a
chrisn marked this conversation as resolved.
Show resolved Hide resolved
{{WebRTCMediaCapabilitiesInfo}} dictionary.</li>
<li>If audio is represented by <var>configuration</var>, set
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, can we link to something that explicitly determines "audio" and "video" types are being represented?

<var>webrtc</var>'s {{WebRTCMediaCapabilitiesInfo/audio}}
to a {{RTCRtpCodecCapability}} dictionary representing the
supported audio configuration.</li>
<li>If video is represented by <var>configuration</var>, set
<var>webrtc</var>'s {{WebRTCMediaCapabilitiesInfo/video}}
to a {{RTCRtpCodecCapability}} dictionary representing the
supported video configuration.</li>
<li>Set <var>info</var>'s {{MediaCapabilitiesInfo/webrtc}}
to <var>webrtc</var>.</li>
</ol>
</li>
<li>
Return <var>info</var>.
</li>
Expand Down Expand Up @@ -941,6 +973,24 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
efficiency unless the device's power source has side effects
such as enabling different decoding modules.
</li>
<li>
If the user agent is able to decode the media represented by
<var>configuration</var> and <var>configuration</var> has a type
of {{MediaDecodingType/webrtc}}, run the following substeps:
chrisn marked this conversation as resolved.
Show resolved Hide resolved
<ol>
<li>Let <var>webrtc</var> be a
{{WebRTCMediaCapabilitiesInfo}} dictionary.</li>
<li>If audio is represented by <var>configuration</var>, set
Copy link
Member

@marcoscaceres marcoscaceres Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as above about determining audio and video is being represented the configuration.

<var>webrtc</var>'s {{WebRTCMediaCapabilitiesInfo/audio}}
to a {{RTCRtpCodecCapability}} dictionary representing the
supported audio configuration.</li>
<li>If video is represented by <var>configuration</var>, set
<var>webrtc</var>'s {{WebRTCMediaCapabilitiesInfo/video}}
to a {{RTCRtpCodecCapability}} dictionary representing the
supported video configuration.</li>
<li>Set <var>info</var>'s {{MediaCapabilitiesInfo/webrtc}}
to <var>webrtc</var>.</li>
</ol>
<li>
Return <var>info</var>.
</li>
Expand Down