cgiffard / Captionator

HTML5 polyfill for closed captioning with the <track> element, and implements the WHATWG Timed Text Track specification.
captionatorjs.com
300 stars 66 forks source link

Externalise & modularise parser, enabling import of alternate parsers into captionator core #6

Closed cgiffard closed 13 years ago

cgiffard commented 13 years ago

Work out a way of creating an extensible parser architecture.

Goals: simple, simple simple.

Ideas:

addParser(myFunctionThatParsesStuff,myFunctionThatTellsCaptionatorMyOtherFunctionCanHandleTheFormat); // My Other Function Is A Porsche

captionator.parser["ttml"] = myParseFunction;
cgiffard commented 13 years ago

I've decided not to do this, as it overcomplicates the API.