Generate video thumbnails on client side

I have videojs and videojs-markers plugin and when the marker is shown up I also want to display thumbnail this particular video moment. But I have no idea how can I generate this thumbnails.
I found solution how to draw thumbnail of current video moment:

function capture(){
    var canvas = document.getElementById('canvas');
    var video = document.getElementById('video');
    canvas.getContext('2d').drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
}

But I’m looking for how to generate images on moment I don’t reach.


Source: html5

Leave a Reply