Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including angular-video-time with all npm packages installed. Try it out:

var angularVideoTime = require("angular-video-time")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

angular-video-time v1.0.0

AngularJS Filter for displaying a video's current time

angular-video-time

AngularJS filter that converts from seconds to a video-friendly display time

Installation

npm install angular-video-time

Usage

// Add 'video-time' to your module's dependencies
require(‘angular-video-time’);
angular.module('myApp', ['video-time']);

//later in your html
{{0 | vTime}} <!-- "0:00" -->
{{0.9 | vTime}} <!-- "0:00" -->

{{61.5 | vTime}} <!-- "1:01" -->

{{3599 | vTime}} <!-- "59:59" -->

{{9001 | vTime}} <!-- "2:30:01" -->
{{9001.999 | vTime}} <!-- "2:30:01" -->
{{9002 | vTime}} <!-- "2:30:02" -->

{{videoPlayer.currentTime || vTime}} <!-- "13:37" -->

To test

npm test

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free