-
Notifications
You must be signed in to change notification settings - Fork 793
HLS Tech #62
Conversation
Moved initializations to init. Rename and repurpose original init method to initSource which gets called from #src.
dispose tech, playlist loader don't trigger loadedmetadata if there was an error no need for duration update workarounds, add duration to tech update all the tests remove irrelevant tests
@@ -7,7 +7,7 @@ | |||
<link href="node_modules/video.js/dist/video-js/video-js.css" rel="stylesheet"> | |||
|
|||
<!-- video.js --> | |||
<script src="node_modules/video.js/dist/video-js/video.js"></script> | |||
<script src="node_modules/video.js/dist/video-js/video.dev.js"></script> |
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.
@gkatsev - Should this be pushed back to non-dev version?
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.
Probably.
return mpegurlRE.test(srcObj.type) || videojs.Flash.canPlaySource.call(this, srcObj); | ||
}; | ||
|
||
videojs.Hls.supportsNativeHls = (function() { |
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.
I think this can be removed now?
}; | ||
|
||
videojs.Hls.prototype.duration = function() { | ||
var playlists = this.player().hls.playlists; |
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.
There's a number of places where the HLS code accesses itself through the player reference player.hls
. I think that's a remnant of the plugin workflow and would be good to move away from that.
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.
It's probably better to internally reference the tech through this
but there are some properties and configuration that can be handy to have access to at runtime. It's useful to understand what state the playlist loader is in, for instance.
Get rid of grunt-contrib-qunit because it was inexplicably failing in phantomjs. It's still possible to test in phantom through karma and the tests all pass there. Add test cases for object disposal on the tech and the playlist loader.
The video.js tech selection now manages whether the HLS polyfill is used or not, so we don't need to detect HLS support in the project itself.
When in the scope of the tech, use `this` to reference the tech instead of going through the player.
Using the dev version can lead to accidental dependencies on non-public functionality.
Ran the project through code climate in case anyone's interested. Not sure yet if it's helpful or distracting to know this stuff. |
This is pretty close to being done. The tests pass if run directly but currently karma is being flaky and stalling for some reason.