Browse Source

Merge pull request #90

DIYgod 7 years ago
parent
commit
e5bf4eca86
5 changed files with 4 additions and 8 deletions
  1. 0 0
      dist/DPlayer.min.js
  2. 0 0
      dist/DPlayer.min.js.map
  3. 1 1
      package.json
  4. 3 6
      src/DPlayer.js
  5. 0 1
      src/video.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
package.json

@@ -1,6 +1,6 @@
 {
   "name": "dplayer",
-  "version": "1.3.1",
+  "version": "1.3.2",
   "description": "Wow, such a lovely HTML5 danmaku video player",
   "main": "dist/DPlayer.min.js",
   "style": "dist/DPlayer.min.css",

+ 3 - 6
src/DPlayer.js

@@ -1,4 +1,4 @@
-console.log('\n %c DPlayer 1.3.1 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
+console.log('\n %c DPlayer 1.3.2 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
 
 require('./DPlayer.scss');
 const utils = require('./utils.js');
@@ -1018,12 +1018,9 @@ class DPlayer {
      * @param {Object} video - new video info
      * @param {Object} danmaku - new danmaku info
      */
-    // TODO
     switchVideo (video, danmaku) {
-        this.video.src = video.url;
-        this.video.poster = video.pic ? video.pic : '';
-        this.video.current.setAttribute('poster', this.video.poster);
-        this.video.current.setAttribute('src', this.video.src);
+        this.video.attr('poster', video.pic ? video.pic : '');
+        this.video.attr('src', video.url);
         this.pause();
         if (danmaku) {
             this.dan = [];

+ 0 - 1
src/video.js

@@ -89,7 +89,6 @@ class Video {
     seek (time) {
         time = Math.max(time, 0);
         time = Math.min(time, this.duration);
-        console.log(time);
 
         let i = 0;
         let tmptime = 0;

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