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
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
3 changed files with 3 additions and 8 deletions

2
dist/DPlayer.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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