Skip to content

Commit

Permalink
Nits and wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Mar 22, 2022
1 parent b4639d4 commit ed70665
Showing 1 changed file with 50 additions and 52 deletions.
102 changes: 50 additions & 52 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -33762,10 +33762,10 @@ interface <dfn interface>HTMLMediaElement</dfn> : <span>HTMLElement</span> {

</p>

<p>A <span>media resource</span> has an associated
<dfn data-x="media-resource-origin">origin</dfn>, which is either "<code data-x="">none</code>",
"<code data-x="">multiple</code>", "<code data-x="">rewritten</code>", or an
<span>origin</span>. It is initially set to "<code data-x="">none</code>".</p>
<p>A <span>media resource</span> has an associated <dfn
data-x="media-resource-origin">origin</dfn>, which is either "<code data-x="">none</code>",
"<code data-x="">multiple</code>", "<code data-x="">rewritten</code>", or an <span>origin</span>.
It is initially set to "<code data-x="">none</code>".</p>

<p>A <span>media resource</span> can have multiple audio and video tracks. For the purposes of a
<span>media element</span>, the video data of the <span>media resource</span> is only that of the
Expand Down Expand Up @@ -34581,29 +34581,29 @@ interface <dfn interface>MediaError</dfn> {
</ol>

<p>To <dfn>verify a media response</dfn> given a <span data-x="concept-response">response</span>
<var>response</var>, a <span>media resource</span> <var>resource</var>, and
"<code data-x="">entire resource</code>" or a
(number, number or "<code data-x="">until end</code>") tuple <var>byteRange</var>:</p>
<var>response</var>, a <span>media resource</span> <var>resource</var>, and "<code
data-x="">entire resource</code>" or a (number, number or "<code data-x="">until end</code>")
tuple <var>byteRange</var>:</p>

<ol>
<li><p>If <var>response</var> is a <span>network error</span>, then return false.</p></li>

<li><p>If <var>byteRange</var> is "<code data-x="">entire resource</code>", then return
true.</p></li>

<li><p>Let <var>internalResponse</var> be <var>response</var>'s
<span>unsafe response</span>.</p></li>
<li><p>Let <var>internalResponse</var> be <var>response</var>'s <span>unsafe
response</span>.</p></li>

<li><p>If <var>internalResponse</var>'s <span data-x="concept-response-status">status</span> is
not 206, then return false.</p></li>

<li><p>Let <var>origin</var> be "<code data-x="">rewritten</code>" if
<var>internalResponse</var>'s <span data-x="concept-response-url">URL</span> is null; otherwise
<var>internalResponse</var>'s <span data-x="concept-response-url">URL</span>'s
<span data-x="concept-url-origin">origin</span>.</p></li>
<var>internalResponse</var>'s <span data-x="concept-response-url">URL</span>'s <span
data-x="concept-url-origin">origin</span>.</p></li>

<li><p>Let <var>previousOrigin</var> be <var>resource</var>'s
<span data-x="media-resource-origin">origin</span>.</p></li>
<li><p>Let <var>previousOrigin</var> be <var>resource</var>'s <span
data-x="media-resource-origin">origin</span>.</p></li>

<li>
<p>If any of the following conditions are true:</p>
Expand All @@ -34629,13 +34629,12 @@ interface <dfn interface>MediaError</dfn> {
by being patched together with other responses from different origins.</p>
</li>

<li><p>Let (<var>start</var>, <var>end</var>) be the result of
<span data-x="extract content-range values">extracting content-range values</span> from
<li><p>Let (<var>start</var>, <var>end</var>) be the result of <span data-x="extract
content-range values">extracting content-range values</span> from
<var>internalResponse</var>.</p></li>

<li><p>If <var>start</var> is not <var>byteRange</var>[0], or if
<var>byteRange</var>[1] is neither "<code data-x="">until end</code>" or <var>end</var>,
return false.</p></li>
<li><p>If <var>start</var> is not <var>byteRange</var>[0], or if <var>byteRange</var>[1] is
neither "<code data-x="">until end</code>" or <var>end</var>, return false.</p></li>

<li><p>Return true.</p></li>
</ol>
Expand Down Expand Up @@ -34707,54 +34706,53 @@ interface <dfn interface>MediaError</dfn> {
element</span> is an <code>audio</code> element, or "<code data-x="">video</code>"
otherwise.</p>

<li><p>Let <var>request</var> be the result of <span
data-x="create a potential-CORS request">creating a potential-CORS request</span> given
<var>current media resource</var>'s <span>URL record</span>, <var>destination</var>, and the
current state of <span>media element</span>'s
<code data-x="attr-script-crossorigin">crossorigin</code> content attribute.</p></li>
<li><p>Let <var>request</var> be the result of <span data-x="create a potential-CORS
request">creating a potential-CORS request</span> given <var>current media resource</var>'s
<span>URL record</span>, <var>destination</var>, and the current state of the <span>media
element</span>'s <code data-x="attr-script-crossorigin">crossorigin</code> content
attribute.</p></li>

<li><p>Set <var>request</var>'s <span data-x="concept-request-client">client</span> to the
<span>media element</span>'s <span>node document</span>'s <span>relevant settings
object</span>.</p></li>

<li><p>Let <var>byteRange</var>, which is "<code data-x="">entire resource</code>" or a
(number, number or "<code data-x="">until end</code>") tuple, be the byte range required to satisfy
missing data in <span>media data</span>. This value is <span>implementation-defined</span>
and may rely on codec, network conditions or other heuristics. The user-agent may determine
to fetch the resource in full, in which case <var>byteRange</var> would be
"<code data-x="">entire resource</code>", to fetch from a byte offset until the end,
in which case <var>byteRange</var> would be
(number, "<code data-x="">until end</code>"), or to fetch a range between two byte offsets,
im which case <var>byteRange</var> would be a (number, number) tuple representing the two
(number, number or "<code data-x="">until end</code>") tuple, be the byte range required to
satisfy missing data in <span>media data</span>. This value is
<span>implementation-defined</span> and may rely on codec, network conditions or other
heuristics. The user-agent may determine to fetch the resource in full, in which case
<var>byteRange</var> would be "<code data-x="">entire resource</code>"; to fetch from a byte
offset until the end, in which case <var>byteRange</var> would be a (number, "<code
data-x="">until end</code>") tuple; or to fetch a range between two byte offsets, in which
case <var>byteRange</var> would be a (number, number) tuple representing the two
offsets.</p></li>

<li>
<p>If <var>byteRange</var> is not "<code data-x="">entire resource</code>", then:</p>

<ol>
<li><p>If <var>byteRange</var>[1] is "<code data-x="">until end</code>" then
<span>add a range header</span> to <var>request</var> given
<var>byteRange</var>[0].</p></li>
<li><p>If <var>byteRange</var>[1] is "<code data-x="">until end</code>", then <span>add a
range header</span> to <var>request</var> given <var>byteRange</var>[0].</p></li>

<li><p>Otherwise, <span>add a range header</span> to <var>request</var> given
<var>byteRange</var>[0] and <var>byteRange</var>[1].</p></li>
</ol>
</li>

<li>
<!--FETCH--><p><span data-x="concept-fetch">Fetch</span> <var>request</var>, with
<i data-x="process response">processResponse</i> set to the following steps given
<span data-x="concept-response">response</span> <var>response</var>:</p>
<!--FETCH--><p><span data-x="concept-fetch">Fetch</span> <var>request</var>, with <i
data-x="process response">processResponse</i> set to the following steps given <span
data-x="concept-response">response</span> <var>response</var>:</p>

<ol>
<li><p>Let <var>global</var> be the <span>media element</span>'s
<span>node document</span>'s <span>relevant global object</span>.</p></li>
<li><p>Let <var>global</var> be the <span>media element</span>'s <span>node
document</span>'s <span>relevant global object</span>.</p></li>

<li><p>Let <var>updateMedia</var> be to <span>queue a media element task</span> given
the <span>media element</span> to run the first appropriate steps from the
<span>media data processing steps list</span> below. (A new task is used for
this so that the work described below occurs relative to the appropriate
<span>media element event task source</span> rather than using the
<span>networking task source</span>.)</p>
<li><p>Let <var>updateMedia</var> be to <span>queue a media element task</span> given the
<span>media element</span> to run the first appropriate steps from the <span>media data
processing steps list</span> below. (A new task is used for this so that the work
described below occurs relative to the appropriate <span>media element event task
source</span> rather than using the <span>networking task source</span>.)</p>

<li><p>Let <var>finalize</var> be to <span>finalize and report timing</span> with
<var>response</var>, <var>global</var>, and <var>destination</var>, and call
Expand All @@ -34768,17 +34766,17 @@ interface <dfn interface>MediaError</dfn> {

<li><p>If the fetching process has completes without errors, including decoding the
media data, and if all of the data is available to the user agent without network
access, then, the user agent must move on to the <i>final step</i> below.
This might never happen, e.g. when streaming an infinite resource such as web radio, or
if the resource is longer than the user agent's ability to cache data.</p>
access, then, the user agent must move on to the <i>final step</i> below. This might
never happen, e.g. when streaming an infinite resource such as web radio, or if the
resource is longer than the user agent's ability to cache data.</p>
</ol>
</li>

<li><p>If the result of <span data-x="verify a media response">verifying</span>
<var>response</var> given the <var>current media resource</var> and
<var>byteRange</var> is false, then call <var>finalize</var>. Otherwise,
<span data-x="body-incrementally-read">incrementally read</span> <var>response</var>'s
<span data-x="concept-response-body">body</span> given <var>updateMedia</var>,
<var>response</var> given the <var>current media resource</var> and <var>byteRange</var>
is false, then call <var>finalize</var>. Otherwise, <span
data-x="body-incrementally-read">incrementally read</span> <var>response</var>'s <span
data-x="concept-response-body">body</span> given <var>updateMedia</var>,
<var>processEndOfMedia</var>, <var>finalize</var>, and <var>global</var>.</p></li>

<li><p>Update the <span>media data</span> with the contents of <var>response</var>'s
Expand Down

0 comments on commit ed70665

Please sign in to comment.