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

Added video.js v6 support #27

Merged
merged 2 commits into from
Aug 29, 2017
Merged

Added video.js v6 support #27

merged 2 commits into from
Aug 29, 2017

Conversation

ganigeorgiev
Copy link
Contributor

No description provided.

Copy link
Collaborator

@mrbar42 mrbar42 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.
I left some notes - please take a look

if (videojs) {
videojs.getComponent('Html5').registerSourceHandler(HlsSourceHandler, 0);
videojs.getTech('Html5').registerSourceHandler(HlsSourceHandler, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets fallback to getComponent since its needed for older versions of videojs5

    var html5Tech = videojs.getTech && videojs.getTech('Html5'); // videojs6 (partially on videojs5 too)
    html5Tech = html5Tech || (videojs.getComponent && videojs.getComponent('Html5')); // videojs5
    if (html5Tech) {
      html5Tech.registerSourceHandler(HlsSourceHandler, 0);
    }

@@ -150,8 +150,12 @@ var HlsSourceHandler = {
if (Hls.isSupported()) {
var videojs = require('video.js'); // resolved UMD-wise through webpack

// we could just use `import videojs from 'video.js'`
Copy link
Collaborator

Choose a reason for hiding this comment

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

its great that we'll support es6 modules, but the comment is not necessary
it can be // support es6 style import

@ganigeorgiev
Copy link
Contributor Author

@mrbar42 Thanks for the quick response. The changes based on the review notes are applied in 3ca5be6.

@mrbar42 mrbar42 merged commit a2a5ff6 into Peer5:master Aug 29, 2017
@mrbar42
Copy link
Collaborator

mrbar42 commented Aug 29, 2017

publish as v3.0.3

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.

2 participants