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

Expose "configuration" to the DOM. #115

Merged
merged 1 commit into from
Oct 25, 2019
Merged
Changes from all 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
53 changes: 40 additions & 13 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,15 @@ spec: workers; urlPrefix: https://www.w3.org/TR/workers/#
<pre class='idl'>
dictionary MediaCapabilitiesDecodingInfo : MediaCapabilitiesInfo {
required MediaKeySystemAccess keySystemAccess;
MediaDecodingConfiguration configuration;
};
</pre>

<p>
The {{MediaCapabilitiesInfo}} has an associated <dfn
for='MediaCapabilitiesInfo'>configuration</dfn> which is a
{{MediaDecodingConfiguration}} or {{MediaEncodingConfiguration}}.
</p>
<pre class='idl'>
dictionary MediaCapabilitiesEncodingInfo : MediaCapabilitiesInfo {
MediaEncodingConfiguration configuration;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is defined for all descendents of MediaCapabilitiesInfo, could we move it to the parent dict?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're ready to once ^^ this minor question is settled :).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I don't think we can move it to the parent, because of IDL. MediaEncodingConfiguration and MediaDecodingConfiguration are disjoint classes, and moving it to the parent would require that parameter be an "any".

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh, good point!

};
</pre>

<p>
A {{MediaCapabilitiesInfo}} has associated <dfn
Expand All @@ -564,6 +565,20 @@ spec: workers; urlPrefix: https://www.w3.org/TR/workers/#
{{EME/MediaKeySystemAccess}} or <code>null</code> as appropriate.
</p>

<p>
A {{MediaCapabilitiesDecodingInfo}} has an associated <dfn
for='MediaCapabilitiesDecodingInfo'>configuration</dfn> which
is the decoding configuration properties used to generate the
{{MediaCapabilitiesDecodingInfo}}.
</p>

<p>
A {{MediaCapabilitiesEncodingInfo}} has an associated <dfn
for='MediaCapabilitiesEncodingInfo'>configuration</dfn> which
is the encoding configuration properties used to generate the
{{MediaCapabilitiesEncodingInfo}}.
</p>

<p class='note'>
If the encrypted decoding configuration is supported, the
resulting {{MediaCapabilitiesInfo}} will include a
Expand All @@ -575,23 +590,24 @@ spec: workers; urlPrefix: https://www.w3.org/TR/workers/#
<h3 id='info-algorithms'>Algorithms</h3>

<section>
<h4 id='create-media-capabilities-info'>
<dfn>Create a MediaCapabilitiesInfo</dfn>
<h4 id='create-media-capabilities-encoding-info'>
<dfn>Create a MediaCapabilitiesEncodingInfo</dfn>
</h4>
<p>
Given a {{MediaEncodingConfiguration}} <var>configuration</var>, this
algorithm returns a {{MediaCapabilitiesInfo}}. The following steps are
algorithm returns a {{MediaCapabilitiesEncodingInfo}}. The following steps are
run:
<ol>
<li>
Let <var>info</var> be a new {{MediaCapabilitiesInfo}} instance.
Let <var>info</var> be a new {{MediaCapabilitiesEncodingInfo}} instance.
Unless stated otherwise, reading and writing apply to
<var>info</var> for the next steps.
</li>
<li>
Set <a for=MediaCapabilitiesInfo>configuration</a> to
<var>configuration</var>.
</li>
Set <a for=MediaCapabilitiesEncodingInfo>configuration</a> to be a new
{{MediaEncodingConfiguration}}. For every property in <var>configuration</var>
create a new property with the same name and value in <a
for=MediaCapabilitiesEncodingInfo>configuration</a>. </li>
<li>
If the user agent is able to encode the media represented by
<var>configuration</var>, set
Expand Down Expand Up @@ -632,6 +648,17 @@ spec: workers; urlPrefix: https://www.w3.org/TR/workers/#
algorithm returns a {{MediaCapabilitiesDecodingInfo}}. The following
steps are run:
<ol>
<li>
Let <var>info</var> be a new {{MediaCapabilitiesDecodingInfo}} instance.
Unless stated otherwise, reading and writing apply to
<var>info</var> for the next steps.
</li>
<li>
Set <a for=MediaCapabilitiesDecodingInfo>configuration</a> to be a new
{{MediaDecodingConfiguration}}. For every property in <var>configuration</var>
create a new property with the same name and value in <a
for=MediaCapabilitiesDecodingInfo>configuration</a>.
</li>
<li>
If <code>configuration.keySystemConfiguration</code> is
<a>present</a>:
Expand Down Expand Up @@ -886,7 +913,7 @@ spec: workers; urlPrefix: https://www.w3.org/TR/workers/#
Let <var>p</var> be a new promise.
</li>
<li>
<a>In parallel</a>, run the <a>Create a MediaCapabilitiesInfo</a>
<a>In parallel</a>, run the <a>Create a MediaCapabilitiesEncodingInfo</a>
algorithm with <var>configuration</var> and resolve <var>p</var>
with its result.
</li>
Expand Down