v1.27.0

Vanilagy/mediabunnyv1.27.0Dec 17, 2025by Vanilagy

AI Summary

Major video API update aligning with WebCodecs API and adding hardware acceleration support.

Key Highlights

  • Added hardware acceleration video conversion option
  • Added `VideoSampleColorSpace` export
  • Improved decoder error stack traces
  • Added options to `VideoSample` methods for custom pixel formats and layouts

Breaking Changes

  • `VideoSample.copyTo()` return type changed from `Promise<void>` to `Promise<PlaneLayout[]>`
  • `VideoSample` allocationSize and copyTo now throw explicit errors when format is null

New Features

  • hardwareAcceleration option
  • VideoSampleColorSpace export
  • Custom pixel formats and layouts in VideoSample methods

Full Release Notes

- Added options to `VideoSample`'s `allocationSize()` and `copyTo()` methods, allowing you to specify output custom pixel formats, plane layouts & more
- `VideoSample.copyTo()` now returns `Promise<PlaneLayout[]>` instead of `Promise<void>`, exactly how the WebCodecs API does it
- Added an optional `layout` option to `VideoSampleInit`
- `VideoSample`'s `allocationSize()` and `copyTo()` now throw with an explicit error message when called when `format === null` (#256)
- Added a `VideoSampleColorSpace` export, now used by `VideoSample.colorSpace`
- Added a `hardwareAcceleration` video conversion option (#254)
- Improved decoder error stack traces (#244)