Skip to content

JoeBot0101/webvtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webvtt

Provides classes to create valid WebVTT files.

See WebVTT - MDN for more information about WebVTT files.

WebVttFile

Represents a simple WebVTT file object. Does not currently support regions or chapters.

WebVttCue

Represents a WebVTT cue object.

Supports cue setting directives (vertical, line, position, size, align). You should be able to include internal cue tags, such as:

  • <b></b> - bold tag
  • <c></c> - class tag
  • <i></i> - italic tag
  • <u></u> - underline tag
  • <ruby></ruby> - ruby tag
  • <rt></rt> - ruby text tag
  • <v></v> - voice tag
  • <hh:mm:ss.ttt> - timestamp tag

No validation is provided for for cue tags.

Conversions - WebVttConverterBase

A simple converter interface and base class is included to help you build custom converter classes.

An example converter class is provided, TtafVttConverter, which converts a Timed Text Authoring Format 1.0 xml file into a valid WebVTT file.

An example cli script is also provided that will convert both single TTAF format xml files, as well as a directory of TTAF format xml files.

About

A set of classes to create valid WebVTT files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages