npm

Join us for the "JavaScript Supply Chain Security" tech talk, presented by VP of Security, Adam Baldwin. 6/20 at 10am PT.Sign up here »

video-time

1.1.0 • Public • Published

video-time Build Status

Convert from seconds to video seek time

Install

$ npm install video-time

Usage

var vTime = require('video-time')
 
vTime(0)        // '0:00'
vTime(0.9)      // '0:00'
vTime(61.5)     // '1:01'
vTime(3599)     // '59:59'
vTime(9001)     // '2:30:01'
vTime(9001.999) // '2:30:01'
vTime(9002)     // '2:30:02'

API

vTime(time) -> string

time

Required Type: Number

Number of seconds to convert to video seek time.

License

MIT

install

npm i video-time

Downloadsweekly downloads

6

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability