Merge pull request #90

This commit is contained in:
DIYgod 2017-06-25 14:18:33 +08:00
parent 767fd47b3d
commit e5bf4eca86
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
5 changed files with 6 additions and 10 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

@ -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",

View File

@ -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 = [];

View File

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