Nautical Poseidon Mythology
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

get-blob-duration

1.0.0 • Public • Published

get-blob-duration

Convenience method to patch Chromium bug when getting duration of HTML5 video or audio Blob.

Usage

Import the method however you like (browser, module, etc.). Once you have it in scope:

// Returns Promise<Number>
getBlobDuration(blob).then(function(duration) {
  console.log(duration + ' seconds');
});

Or use ECMAScript 6:

// yada yada async
const duration = await getBlobDuration(blob)
console.log(duration + ' seconds')

install

npm i get-blob-duration

Downloadsweekly downloads

115

version

1.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar