Skip to content

Commit

Permalink
Bring back bools
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed Apr 22, 2022
1 parent 026e778 commit ecab5f3
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -34918,22 +34918,24 @@ interface <dfn interface>MediaError</dfn> {
(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
"<code data-x="">failure</code>".</p></li>
<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>If <var>internalResponse</var>'s <span data-x="concept-response-status">status</span> is
neither 200 or 206, then return "<code data-x="">failure</code>".</p></li>
<li>
<p>If <var>internalResponse</var>'s <span data-x="concept-response-status">status</span> is
200, then return true.</p>

<li><p>If <var>internalResponse</var>'s <span data-x="concept-response-status">status</span> is
200, then: If <var>byteRange</var> is "<code data-x="">entire resource</code>" then return
"<code data-x="">success</code>". Otherwise return
"<code data-x="">range not supported</code>".</p></li>
<p class="note">Though some user-agents allow playing media from origins who don't support
range requests, this is generally discouraged as it requires buffering on the client side.</p>
</li>

<li><p>If <var>byteRange</var> is "<code data-x="">entire resource</code>" then set
<var>byteRange</var> to (0, "<code data-x="">until end</code>").</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
Expand All @@ -34958,8 +34960,7 @@ interface <dfn interface>MediaError</dfn> {
<p>then set <var>resource</var>'s <span data-x="media-resource-origin">origin</span> to
<var>origin</var>.</p>

<p>Otherwise, if <var>response</var> is <span>CORS-cross-origin</span>, then return
"<code data-x="">failure</code>".</p>
<p>Otherwise, if <var>response</var> is <span>CORS-cross-origin</span>, then return false.</p>

<p>Otherwise, set <var>resource</var>'s <span data-x="media-resource-origin">origin</span> to
"<code data-x="">multiple</code>".</p>
Expand All @@ -34968,15 +34969,7 @@ 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
<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 "<code data-x="">range mismatch</code>".</p></li>

<li><p>Return "<code data-x="">success</code>".</p></li>
<li><p>Return true.</p></li>
</ol>

<p>The <dfn data-x="concept-media-load-resource" export>resource fetch algorithm</dfn> for a
Expand Down Expand Up @@ -35116,7 +35109,7 @@ interface <dfn interface>MediaError</dfn> {
<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
"<code data-x="">failure</code>", then call <var>finalize</var>. Otherwise,
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
Expand Down

0 comments on commit ecab5f3

Please sign in to comment.