Skip to content

Modern packaging, webp and async capture

Latest

Choose a tag to compare

@ilkkao ilkkao released this 25 Oct 16:02
174f52a
  • Ship ES module, CommonJS, and UMD builds with TypeScript types. The default import now works in bundlers.
  • require() still exposes captureVideoFrame, and the UMD build keeps the captureVideoFrame global and AMD support.
  • Breaking: the capture-video-frame/capture-video-frame.js path is gone. Use the package name, or dist/capture-video-frame.umd.js for a script tag.
  • Add webp output. The returned format is the format the browser actually encoded.
  • Add captureVideoFrameAsync(), based on canvas.toBlob().
  • Return false when the video has no frame loaded yet.
  • Respect a quality of 0.
  • Remove Bower support.

npm: https://www.npmjs.com/package/capture-video-frame/v/2.0.0