vc

vtt-creator

Very basic Node.js/JavaScript library to generate VTT open subtitles files

Showing:

Popularity

Downloads/wk

161

GitHub Stars

17

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

vtt-creator

npm version Build Status codecov.io

Very basic and experimental Node.js/JavaScript library to generate VTT open subtitles files

Install

With NPM:

npm install --save vtt-creator

or with Bower:

With NPM:

bower install --save vtt-creator

Example

To include Vtt in your Node.js project simply use:

var Vtt = require('vtt-creator');

or in a fronted app using bower (Vtt will be available as a global instance):

<script src="bower_components/vtt-creator/dist/vtt.min.js"></script>

Usage:

var v = new Vtt();
v.add(1.05, 4, 'Never drink liquid nitrogen.', 'align:middle line:84%');
v.add(5, 9, ['It will perforate your stomach.', 'You could die.']);

console.log(v.toString());

the previous snippet will generate:

WEBVTT

1
00:00:01.050 --> 00:00:04.000 align:middle line:84%
Never drink liquid nitrogen.

2
00:00:05.000 --> 00:00:09.000
It will perforate your stomach.
You could die.

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100