This example demonstrates locally saving the generated snapshot image.
To enable the locally downloading of snapshot images configure the saveLocal
config therefore a backend server is not required.
<div class="flex w-full h-auto my-auto">
<video class="video-js vjs-default-skin vjs-fluid is-snapshot" crossorigin="anonymous" controls="" id="download"></video>
</div>
<script type="text/javascript">
var player = videojs("download", {
"plugins": {
"snapshot": {
"savelocal": true
}
},
"snapshotname": "test2-[time].png",
"sources": [
{
"src": "https://videos.electroteque.org/bitrate/elephants_dream_2000k.webm",
"type": "video/webm"
},
{
"src": "https://videos.electroteque.org/bitrate/elephants_dream_2000k.mp4",
"type": "video/mp4"
},
{
"src": "https://videos.electroteque.org/bitrate/elephants_dream_2000k.ogv",
"type": "video/ogg"
}
]
});
</script>