-
Notifications
You must be signed in to change notification settings - Fork 55
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
Conversation
There was a problem hiding this 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
src/videojs.hlsjs.js
Outdated
if (videojs) { | ||
videojs.getComponent('Html5').registerSourceHandler(HlsSourceHandler, 0); | ||
videojs.getTech('Html5').registerSourceHandler(HlsSourceHandler, 0); |
There was a problem hiding this comment.
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);
}
src/videojs.hlsjs.js
Outdated
@@ -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'` |
There was a problem hiding this comment.
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
publish as v3.0.3 |
No description provided.