nano-metadata

0.1.2 • Public • Published

nano-metadata Linter Test

Why do tests fail?

Description

Get duration of video file in browser

Install

npm install nano-metadata

or

yarn add nano-metadata

Usage

Video duration

import nanoMetadata from 'nano-metadata'

change(e) {
  const file = e.target.files[0]
  
  nanoMetadata.video.duration(file).then((duration) => {
    console.log(duration) // will show you video duration in seconds
  })
}

Features

Video Audio
Duration
other features?

Contribute

Option 1

  1. Clone repo git clone git@github.com:kalashnikovisme/nano-metadata
  2. Run yarn
  3. To run linter make linter

Option 2 (for Purple Magic contributors)

Just run Codespace

Why do tests fail?

This package uses onloadedmetadata event to store video duration. We use js-dom for web implementation in the tests. Looks like it does not support this event for now.

Solutions

We will rewrite tests with chrome headless and selenium soon

Readme

Keywords

none

Package Sidebar

Install

npm i nano-metadata

Weekly Downloads

63

Version

0.1.2

License

MIT

Unpacked Size

4.59 kB

Total Files

8

Last publish

Collaborators

  • kalashnikovisme