diff --git a/client/capture-video-frame.js b/client/capture-video-frame.js new file mode 100644 index 00000000..4cbd30a1 --- /dev/null +++ b/client/capture-video-frame.js @@ -0,0 +1,23 @@ +module.exports = captureVideoFrame + +function captureVideoFrame (video, format) { + if (typeof video === 'string') video = document.querySelector(video) + if (!video || video.nodeName !== 'VIDEO') { + throw new Error('First argument must be a