Skip to content

Commit

Permalink
compatible with hls.js's new version
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jul 28, 2017
1 parent daeccbd commit 15cab8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/DPlayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/DPlayer.min.js.map

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions src/DPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15cab8f

Please sign in to comment.