Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors defaults for vtt.js #2426

Closed
wants to merge 2 commits into from
Closed

Conversation

erkattak
Copy link

@erkattak erkattak commented Aug 3, 2015

No description provided.

@heff
Copy link
Member

heff commented Aug 3, 2015

Both commits seem reasonable to me but I think the second would break the use case where someone is using the no-vtt version plus npm modules (to save file size upfront and lazy load vtt.js). Are you using the no-vtt.js version too or can you use the standard version that includes vtt.js already?

if (!window['WebVTT'] && this.el().parentNode != null) {
let script = document.createElement('script');
script.src = this.options_['vtt.js'] || '../node_modules/vtt.js/dist/vtt.js';
script.src = this.options_['vtt.js'] || 'https://raw.githubusercontent.com/mozilla/vtt.js/v0.12.1/dist/vtt.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not using the official mozilla version right now.
Also, making this change means that developing locally could be a pain. Not sure exactly what we would want to do here instead. Maybe replace it with the rawgit url on built?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing on build would make sense. The built module should not have a reference to node_modules

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be a little... ugly... since it's not really what "versionify" implies, but we already have browserify-versionify in use. We could use that to replace the node_modules reference on build:

['browserify-versionify', {
  placeholder: '../node_modules/vtt.js/dist/vtt.js',
  version: 'https://raw.githubusercontent.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js'
}],

Confirmed this replaces it properly in the built version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to do on built, though, that still doesn't solve the local development issue.

@gkatsev
Copy link
Member

gkatsev commented Oct 26, 2015

Hey, @brkattk, we're working on fixing the vtt.js inclusion thing in a new PR: #2741
But your first commit looks like something we'd want to get in. Would you be willing to make a new PR (or update this PR) to only include that commit?
Thanks!

@erkattak
Copy link
Author

@gkatsev I reset back to the first commit

@pam
Copy link

pam commented Oct 27, 2015

Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 56628df
Build details: https://travis-ci.org/pam/video.js/builds/87729222

(Please note that this is a fully automated comment.)

@gkatsev
Copy link
Member

gkatsev commented Oct 27, 2015

Hm... the test failure from @pam might be legitimate, though, possibly fixed already. Would you be able to rebase this branch against the latest master?

@pam
Copy link

pam commented Oct 27, 2015

Tests passed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: 441e4cb
Build details: https://travis-ci.org/pam/video.js/builds/87733641

(Please note that this is a fully automated comment.)

@gkatsev
Copy link
Member

gkatsev commented Oct 27, 2015

Awesome. Looks like the tests are all green now (travis has stopped reporting back for some reason).

@gkatsev
Copy link
Member

gkatsev commented Oct 28, 2015

LGTM

@gkatsev gkatsev closed this in c24a3a8 Oct 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants