Skip to content

Commit

Permalink
Fix #338: Allow Wait for Key to transition readyState to HAVE_CURRENT…
Browse files Browse the repository at this point in the history
…_DATA (#343)
  • Loading branch information
ddorwin committed Oct 25, 2016
1 parent b736813 commit 819a1e3
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 33 deletions.
18 changes: 17 additions & 1 deletion encrypted-media-respec.html
Original file line number Diff line number Diff line change
Expand Up @@ -3072,7 +3072,23 @@ <h4>Wait for Key</h4>
<p class="note">As a result of the above step, the media element will become a <a def-id="blocked-media-element"></a> if it wasn't already. In that case, the media element will stop playback.</p>
</li>
<li><p><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="waitingforkey"></a> at the <var>media element</var>.</p></li>
<li><p>Set the <a def-id="readystate"></a> of <var>media element</var> to <a def-id="have-metadata"></a>.</p></li>
<li>
<p>Follow the steps for the first matching condition from the following list:</p>
<dl class="switch">
<dt>If data for the immediate <a def-id="current-playback-position"></a> is available</dt>
<dd>
<p>Set the <a def-id="readystate"></a> of <var>media element</var> to <a def-id="have-current-data"></a>.</p>
</dd>
<dt>Otherwise</dt>
<dd>
<p>Set the <a def-id="readystate"></a> of <var>media element</var> to <a def-id="have-metadata"></a>.</p>
</dd>
<p class="note">
In other words, if the video frame and audio data for the <a def-id="current-playback-position"></a> have been decoded because they were unencrypted and/or successfully decrypted, set <a def-id="readystate"></a> to <a def-id="have-current-data"></a>.
Otherwise, including if this was previously the case but the data is no longer available, set <a def-id="readystate"></a> to <a def-id="have-metadata"></a>.
</p>
</dl>
</li>
<li><p>Suspend playback.</p></li>
</ol>
</section>
Expand Down
Loading

0 comments on commit 819a1e3

Please sign in to comment.