Skip to content

Revamp WebCodecs documentation#43697

Open
sb2702 wants to merge 24 commits intomdn:mainfrom
sb2702:webcodecs-docs-1
Open

Revamp WebCodecs documentation#43697
sb2702 wants to merge 24 commits intomdn:mainfrom
sb2702:webcodecs-docs-1

Conversation

@sb2702
Copy link
Copy Markdown
Contributor

@sb2702 sb2702 commented Apr 7, 2026

Description

As per this discussion, I have revamped the WebCodecs documentation by documenting the high level concepts of the core WebCodecs API, as well as adding 3 specific guides:

  • A primer on Video Processing
  • Usage guide with code examples for how to practically use the WebCodecs API
  • Codec selection guide, how to specify and choose a codec string for use in WebCodecs

Motivation

The existing WebCodecs documentation is very sparse and bare compared to other APIs. Having developed WebCodecs applications for several years, the existing docs are not sufficient as practical guides to using the API.

I built https://webcodecsfundamentals.org/, an actual real-world guide to building production WebCodecs applications, both from my experience and with contributions from other devs who've built popular WebCodecs libraries, which is already referenced in MDN and by Chrome Developer Blog and CanIUse.

The motivation for this PR is to actually put the most substantive, core WebCodecs documentation on MDN itself, including pragmatic, core bits of information such as the need to manage encoder.encodeQueueSize which is not documented anywhere, but which is critical for avoiding application crashes when working with WebCodecs.

Additional details

The underlying discussion

Related issues and pull requests

@sb2702 sb2702 requested review from a team as code owners April 7, 2026 16:48
@sb2702 sb2702 requested review from dipikabh and hamishwillee and removed request for a team April 7, 2026 16:48
@github-actions github-actions bot added Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed labels Apr 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Preview URLs (4 pages)

Flaws (1)

Note! 3 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/API/WebCodecs_API
Title: WebCodecs API
Flaw count: 1

  • macros:
    • Macro domxref produces link /en-US/docs/Web/API/Canvas which is a redirect
External URLs (36)

URL: /en-US/docs/Web/API/WebCodecs_API
Title: WebCodecs API


URL: /en-US/docs/Web/API/WebCodecs_API/Codec_selection
Title: Codec selection


URL: /en-US/docs/Web/API/WebCodecs_API/Video_processing_concepts
Title: Video processing concepts

(comment last updated: 2026-04-09 21:16:58)

@sb2702 sb2702 requested review from Djuffin and dalecurtis April 9, 2026 04:28
Copy link
Copy Markdown
Contributor

@dalecurtis dalecurtis left a comment

Choose a reason for hiding this comment

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

Generally lgtm. Thanks for doing this!

@hamishwillee
Copy link
Copy Markdown
Collaborator

I hope to look at this next week, if @dipikabh doesn't beat me to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants