compatible with hls.js's new version

This commit is contained in:
DIYgod
2017-07-28 15:27:42 +08:00
parent daeccbde2e
commit 15cab8fbb3
3 changed files with 3 additions and 8 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -6
View File
@@ -1107,13 +1107,8 @@ class DPlayer {
if (enablehls && Hls.isSupported()) {
// this.element.getElementsByClassName('dplayer-time')[0].style.display = 'none';
const hls = new Hls();
hls.loadSource(this.option.video.url[0]);
hls.attachMedia(this.video.current);
hls.on(Hls.Events.MEDIA_ATTACHED, () => {
hls.loadSource(this.option.video.url);
hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
this.notice("manifest loaded, found " + data.levels.length + " quality level");
});
});
}
// Support FLV