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

Editorial: remove plugin language from media elements #9440

Merged
merged 2 commits into from
Jun 20, 2023
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Jun 19, 2023

@annevk annevk requested a review from domenic June 19, 2023 13:33
@@ -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
Copy link
Member Author

@annevk annevk Jun 19, 2023

Choose a reason for hiding this comment

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

Note that this is cleaning up the contents of a comment. As such I didn't feel the need to rewrap since we'd probably change it anyway if we ever decided to add this language. (Same below.)

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Nice find

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") {
while (videoSection.hasChildNodes())
Copy link
Member

Choose a reason for hiding this comment

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

Feel free to replace the contents of this if block with videoSection.replaceChildren(videoElement) (plus the src-setting line).

@annevk annevk merged commit 40a0dcf into main Jun 20, 2023
@annevk annevk deleted the annevk/media-plugin branch June 20, 2023 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants