Merge pull request #357 from A-Circle-Zhang/master

fix #307 and #298
This commit is contained in:
DIYgod 2018-08-22 14:23:03 +08:00 committed by GitHub
commit f8514ba789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -436,6 +436,10 @@ class DPlayer {
// video download error: an error occurs
this.on('error', () => {
if (!this.video.error) {
// Not a video load error, may be poster load failed, see #307
return
}
this.tran && this.notice && this.type !== 'webtorrent' & this.notice(this.tran('Video load failed'), -1);
});

View File

@ -11,7 +11,7 @@ class User {
};
this.default = {
opacity: 0.7,
volume: player.options.volume || 0.7,
volume: player.options.hasOwnProperty('volume') ? player.options.volume : 0.7,
unlimited: (player.options.danmaku && player.options.danmaku.unlimited ? 1 : 0) || 0,
danmaku: 1,
subtitle: 1
@ -38,4 +38,4 @@ class User {
}
}
export default User;
export default User;