To WebCodecs origin trial / experimental users:
Chrome 93 is expected to release to stable channel on August 31st. Please see below for breaking changes and new features for WebCodecs in this release.
We know this is a long list! Apologies for the disruption. WebCodecs will ship in M94, which means we'll send one final email of this sort (but shorter) for M94.
Breaking changes in M93
VideoFrame
VideoFrame.readInto() is renamed to VideoFrame.copyTo() for consistency with other interfaces.
The VideoFrame Planes interface is entirely deleted, including the VideoFrame planes attribute and the VideoFrame planes constructor.
frame.planes.readInto() is replaced by frame.copyTo(dest, ...), offering simpler and more efficient readback.
new VideoFrame(planes, ...) is replaced by new VideoFrame(BufferSource data, ...).
VideoFrameRegion is replaced by DOMRect for better coherence with other APIs. Attribute / dictionary names are updated to match.
VideoFrame visibleRegion and codedRegion are renamed to visibleRect and codedRect, both returning a DOMRectReadOnly.
VideoFrameCopyToOptions rect is now a DOMRectInit
Attributes cropLeft, cropTop, cropWidth, and cropHeight are all removed in favor of visibleRect.
VideoPixelFormat names are updated to be more intuitive / descriptive.
RGB format names have been reversed such that letter order in the name now matches channel order in the array (e.g. RGBA = [R, G, B, A, ...])
A new YUV format, I420A, was added for I420 + an alpha plane.
VideoFrames created from Canvas will now be RGBA when constructed with alpha=keep. This is not formally a break (folks should always be prepared to handle any VideoPixelFormat, including `null` for unknown), but worth noting. Users should instead use alpha=discard if they don't need alpha data.
AudioData
Everything changed! AudioData was completely redesigned, decoupling from WebAudio's AudioBuffer to offer lower level audio primitives.
Encoded{Audio|Video}Chunk
These interfaces were made immutable, removing the chunk.data attribute in favor of a chunk.copyTo(dest) method.
VideoEncoder
We implemented VideoEncoderConfig.bitrateMode, which defaults to "variable" bitrate. Sites that desire "constant" bitrate should now take care to set this field accordingly. Previously, the default behavior was platform/codec specific.
VideoDecoder
The VideoDecoderConfig members displayWidth, displayHeight, and all crop* members were removed. They are replaced by new attributes displayApsectWidth and displayAspectHeight.
The chunk provided to decode(chunk) following any call to flush() or configure() must be a key frame. Failing to provide a key frame will throw a DataError.
General
[EnforceRange] is now added to numeric dictionary members. Out of range values will cause an exception to be thrown (ex: VideoDecoderConfig's codedWidth must be in the range of unsigned long)
We've updated a few input validation exceptions to throw TypeError rather than ConstraintError, matching the spec.
Noteworthy additions in M93
DevTools support for WebCodecs usage in DedicatedWorkers (Window already supported)
AudioDecoding support for "alaw" and "mulaw" PCM
Encoded{Audio|Video}Chunks are serializable, meaning you can postMessage(chunk)
Best,
Chris