drawVideoToCanvas

Type:Function
Status:stable
Since:1.0.0-beta.21
Platform:js
@blackbyte.sugar.js.dom.css

Draw the current frame of a video into a canvas.

Params

  1. $video*-HTMLVideoElement

    The video you want to draw into the canvas

  2. [$canvas]*-HTMLCanvasElement

    An optional canvas to draw into. If not provided, a new canvas will be created

Example

import { drawVideoToCanvas } from '@blackbyte/sugar/js/dom';
const $canvas = drawVideoToCanvas($video);

Todo

  • testsnormal

Author