How can I use javascript to get the thumbnail of an html5 video?
问题 I have found the JavaScript code to get the thumbnail of a video, given its URL. However, I've only found this for YouTube and Vimeo. Nobody seems to have listed an example of how to do it with video that is intended to be embedded with the html5 video tag. Can it be done? Thanks. 回答1: Yes, you can use video as image source for canvas. Just wrap the code as a function which takes video and size as arguments, and return a canvas element. The video must be loaded and at the frame you want to