Skip to content

Commit

Permalink
use insertBefore instead of prepend
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jun 27, 2017
1 parent 24bf673 commit 6679214
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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.

2 changes: 1 addition & 1 deletion src/DPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ class DPlayer {
const videoHTML = html.video(false, null, this.option.screenshot, 'auto', this.quality.url);
const videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;
const parent = this.element.getElementsByClassName('dplayer-video-wrap')[0];
parent.prepend(videoEle);
parent.insertBefore(videoEle, parent.getElementsByTagName('div')[0]);
this.prevVideo = this.video;
this.video = new Video([videoEle], this.prevVideo.duration);
this.initVideo();
Expand Down

0 comments on commit 6679214

Please sign in to comment.