Skip to content

move132/poster-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poster-image

Capture preview image from a video file. Useful when dealing with videos uploaded by the user.

usage

HTML

<script src="poster.js"></script>

Javascript

poster(file).then(function(blob) {
  var image = new Image()
  image.src = URL.createObjectURL(blob)
  document.body.appendChild(image)
})

browser support

Tested with latest Chrome, Firefox, Opera and Edge.

api

poster(file)

Create a video preview image from the given video file.

  • file - video of type File or Blob.

  • returns a Promise with the image data as Blob

license

See License

About

Capture preview image from a video file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%