Browse Source

use insertBefore instead of prepend

DIYgod 8 years ago
parent
commit
6679214f1a
3 changed files with 1 additions and 1 deletions
  1. 0 0
      dist/DPlayer.min.js
  2. 0 0
      dist/DPlayer.min.js.map
  3. 1 1
      src/DPlayer.js

File diff suppressed because it is too large
+ 0 - 0
dist/DPlayer.min.js


File diff suppressed because it is too large
+ 0 - 0
dist/DPlayer.min.js.map


+ 1 - 1
src/DPlayer.js

@@ -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();

Some files were not shown because too many files changed in this diff