WebVTT parser in JavaScript