Merge pull request #57 from sinchang/patch-1

fix option error; update style
This commit is contained in:
Wenjie Fan 2017-04-12 18:39:08 +08:00 committed by GitHub
commit dfe84172dd
2 changed files with 6 additions and 4 deletions

View File

@ -33,7 +33,10 @@
&.dplayer-no-danmaku {
.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box {
height: 60px;
.dplayer-setting-showdan,
.dplayer-setting-danmaku {
display: none;
}
}
.dplayer-controller .dplayer-icons .dplayer-comment {
@ -539,7 +542,6 @@
bottom: 50px;
transform: translateX(170px);
width: 150px;
height: 120px;
border-radius: 2px;
background: rgba(28, 28, 28, 0.9);
padding: 7px 0;

View File

@ -24,10 +24,10 @@ module.exports = (option) => {
option[defaultKey] = defaultOption[defaultKey];
}
}
if (!option.video.hasOwnProperty('type')) {
if (option.video && !option.video.hasOwnProperty('type')) {
option.video.type = 'auto';
}
if (!option.danmaku.hasOwnProperty('user')) {
if (option.danmaku && !option.danmaku.hasOwnProperty('user')) {
option.danmaku.user = 'DIYgod';
}