0.1.4 • Published 1 year ago

canvas-video-cropper v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Belivvr canvas video cropper

Before

After

  interface Props {
    targetVideo: HTMLVideoElement;
    canvas: HTMLCanvasElement;
    view: HTMLCanvasElement;
    ratio: number;
    width: number;
    height: number;
  }
  
  export function makeEditedVideo({
    targetVideo,
    canvas,
    view,
    ratio,
    width,
    height,
  }: Props): void;

Step

  1. prepare pseudo canvas, view canvas, choose the video that you want to crop.

스크린샷 2022-11-24 오후 2 36 55

  1. use function makeEditedVideo for crop.

스크린샷 2022-11-24 오후 2 41 11

  1. if success, get video like this. (id = 'maked-video')

스크린샷 2022-11-24 오후 2 42 06