Encoders are used to capture image frames of an HTML <canvas/> and encode them into videos. Each instance of an encoder represents a file artifact. During capture, they provide asynchronous functions for adding frames and saving videos. See DeckAdapter.render for usage.
| Encoder Class | Type | Description |
|---|---|---|
FrameEncoder |
Base | The base encoder needs to be implemented with a start, add, and save function. |
PreviewEncoder |
Utility | A mock encoder used to preview animations. |
WebMEncoder |
Video | Encodes .webm video using Whammy. |
GIFEncoder |
Animated Image | Encodes .gif images using gifshot.js. |
StreamEncoder |
Video | Encodes .webm rough previews, but drops frames. |
PNGSequenceEncoder |
Image Sequence | Encodes video frames as loseless .png contained in a .zip. |
JPEGSequenceEncoder |
Image Sequence | Encodes video frames as compressed .jpeg contained in a .zip. |
Encoders started as a fork of CCapture.js, which is under MIT license.