vtt-cue-object
v1.1.0
Published
Basic object extraction from WebVTT cues
Downloads
13
Readme
vtt-cue-object
Simple wrapper around vtt.js that runs without any browser and produces an object representation of WebVTT cues.
Usage
var VttToObject = require('vtt-cue-object');
var vttText = '...'; // (WebVTT subtitles as a string)
VttToObject(vttText, function (err, obj) {
if (!err) {
// obj has startTime and endTime (decimal seconds) and text (string)
}
});