Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript screenshot in video

let canvas = document.createElement('canvas');
let video = document.getElementById('my-video');

canvas.width = 1920;
canvas.height = 1080;

let ctx = canvas.getContext('2d');
ctx.drawImage( video, 0, 0, canvas.width, canvas.height );

let image = canvas.toDataURL('image/jpeg');
Source by serversideup.net #
 
PREVIOUS NEXT
Tagged: #Javascript #screenshot #video
ADD COMMENT
Topic
Name
9+2 =