videojs / vtt.js

A JavaScript implementation of the WebVTT specification, forked from vtt.js for use with Video.js

Home Page:http://dev.w3.org/html5/webvtt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work in meteor.js

pstoll opened this issue · comments

We are running into an issue when using video.js in meteorjs because of this library.

This package is failing to load because root.VTTRegion is undefined here:
https://github.com/videojs/vtt.js/blob/master/lib/vttregion-extended.js#L29

If I add a

module.exports.VTTRegion = this.VTTRegion;

at the very end of https://github.com/videojs/vtt.js/blob/master/lib/vttregion.js#L138 it all works nicely.

Would you be open to adding that modules.exports definition if I make a PR?

@pstoll It'd absolutely be welcome. We always appreciate any help making our libraries more compatible with other libraries/frameworks!

cc @gkatsev

This is probably fine, though, I would be a bit weary because the more we modify the main files, the harder it'll be updating from upstream.

Looks like I just ran into this when trying out rollup in video.js.

I'm working on this.