attempt to implement popcorn.js and parserSRT.js