Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

get-blob-duration

1.0.1 • 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')

Changelog

1.0.1

  • Typescript defs (thanks kandros)
  • Fix audits + gulp update to ^4.0.0

1.0.0

Initial release

install

npm i get-blob-duration

Downloadsweekly downloads

547

version

1.0.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability