Skip to content

Commit

Permalink
Editorial: remove plugin language from media elements
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Jun 20, 2023
1 parent 53e9754 commit 40a0dcf
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -34129,8 +34129,8 @@ interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span>

<p>Content may be provided inside the <code>video</code> element<span w-nodev>. User agents
should not show this content to the user</span>; it is intended for older web browsers which do
not support <code>video</code>, so that legacy video plugins can be tried, or to show text to the
users of these older browsers informing them of how to access the video contents.</p>
not support <code>video</code>, so that text can be shown to the users of these older browsers
informing them of how to access the video contents.</p>

<p class="note">In particular, this content is not intended to address accessibility concerns. To
make video content accessible to the partially sighted, the blind, the hard-of-hearing, the deaf,
Expand Down Expand Up @@ -34454,7 +34454,7 @@ interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span>

<!- - similar note in audio codecs section - ->
<p class="note">Implementations are free to implement support for video codecs either natively, or
using platform-specific APIs, or using plugins: this specification does not specify how codecs are
using platform-specific APIs: this specification does not specify how codecs are
to be implemented.</p>

</div>
Expand Down Expand Up @@ -34528,8 +34528,8 @@ interface <dfn interface>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span>

<p>Content may be provided inside the <code>audio</code> element<span w-nodev>. User agents
should not show this content to the user</span>; it is intended for older web browsers which do
not support <code>audio</code>, so that legacy audio plugins can be tried, or to show text to the
users of these older browsers informing them of how to access the audio contents.</p>
not support <code>audio</code>, so that text can be shown to the users of these older browsers
informing them of how to access the audio contents.</p>

<p class="note">In particular, this content is not intended to address accessibility concerns. To
make audio content accessible to the deaf or to those with other physical or cognitive
Expand Down Expand Up @@ -34610,7 +34610,7 @@ interface <dfn interface>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span>

<!- - similar note in video codecs section - ->
<p class="note">Implementations are free to implement support for audio codecs either natively, or
using platform-specific APIs, or using plugins: this specification does not specify how codecs are
using platform-specific APIs: this specification does not specify how codecs are
to be implemented.</p>

</div>
Expand Down Expand Up @@ -35284,30 +35284,18 @@ interface <dfn interface>MediaError</dfn> {
<div class="example">

<p>This script tests to see if the user agent supports a (fictional) new format to dynamically
decide whether to use a <code>video</code> element or a plugin:</p>
decide whether to use a <code>video</code> element:</p>

<pre><code class="html">&lt;section id="video">
&lt;p>&lt;a href="playing-cats.nfv">Download video&lt;/a>&lt;/p>
&lt;/section>
&lt;script>
var videoSection = document.getElementById('video');
var videoElement = document.createElement('video');
var support = videoElement.canPlayType('video/x-new-fictional-format;codecs="kittens,bunnies"');
if (support != "probably" &amp;&amp; "New Fictional Video Plugin" in navigator.plugins) {
// not confident of browser support
// but we have a plugin
// so use plugin instead
videoElement = document.createElement("embed");
} else if (support == "") {
// no support from browser and no plugin
// do nothing
videoElement = null;
}
if (videoElement) {
while (videoSection.hasChildNodes())
videoSection.removeChild(videoSection.firstChild);
const videoSection = document.getElementById('video');
const videoElement = document.createElement('video');
const support = videoElement.canPlayType('video/x-new-fictional-format;codecs="kittens,bunnies"');
if (support === "probably") {
videoElement.setAttribute("src", "playing-cats.nfv");
videoSection.appendChild(videoElement);
videoSection.replaceChildren(videoElement);
}
&lt;/script></code></pre>

Expand Down

0 comments on commit 40a0dcf

Please sign in to comment.