JSFiddle - React, Tailwind, and code Playground

HTML

<video id="video" src="https://public.lookielooapp.com/cropped2.mp4" type="video/mp4" controls height="200px" width="200px"></video><br/>
<button onclick="capture()">Capture</button> <br/><br/>
<canvas id="canvas" width="200px" height="200px"></canvas> <br/><br/>
<!--<button onclick="save()">Save</button> <br/><br/>-->

JavaScript

function capture(){
    var canvas = document.getElementById('canvas');
    var video = document.getElementById('video');

    canvas.getContext('2d').drawImage(video, 0, 0, video.clientWidth, video.clientHeight);
}

/*

Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
(bc inside iframe, but we can still save the image by right-clicking on the generated canevas)

function save(){
    var canvas = document.getElementById('canvas');
    return canvas.toDataURL("image/png");
}

*/