bug fixing: blank in danamku input, danmaku duration in full screen; danakmu input dislocation

This commit is contained in:
DIYgod
2016-05-20 21:22:11 +08:00
parent c27d6282ec
commit df5c18093a
7 changed files with 25 additions and 9 deletions
-2
View File
@@ -131,8 +131,6 @@ $ npm run build
- [ ] icon 动画
- [ ] bug: 弹幕发送框隐藏再输入页面出错; 输入空格; 全屏弹幕过快
## LICENSE
MIT © [DIYgod](http://github.com/DIYgod)
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dplayer",
"version": "0.1.2",
"version": "0.1.4",
"description": "Wow, such a lovely HTML5 danmaku video player",
"main": "dist/DPlayer.min.js",
"scripts": {
+7 -2
View File
@@ -895,6 +895,8 @@
};
const sendComment = () => {
commentInput.blur();
// text can't be empty
if (!commentInput.value.replace(/^\s+|\s+$/g, '')) {
alert('要输入弹幕内容啊喂!');
@@ -953,6 +955,7 @@
clearInterval(disableHide);
this.element.classList.remove('dplayer-show-controller');
closeCommentSetting();
document.addEventListener('keydown', handleKeyDown);
}
};
const openComment = () => {
@@ -962,6 +965,7 @@
clearTimeout(hideTime);
}, 1000);
this.element.classList.add('dplayer-show-controller');
document.removeEventListener('keydown', handleKeyDown);
};
mask.addEventListener('click', () => {
@@ -1047,7 +1051,7 @@
/**
* hot key
*/
document.addEventListener('keydown', (e) => {
const handleKeyDown = (e) => {
const event = e || window.event;
let percentage;
switch (event.keyCode) {
@@ -1088,7 +1092,8 @@
switchVolumeIcon();
break;
}
});
};
document.addEventListener('keydown', handleKeyDown);
/**
* right key
+13
View File
@@ -8,6 +8,19 @@
width: 100%;
height: 100%;
background: #000;
.dplayer-danmaku-top,
.dplayer-danmaku-bottom {
&.dplayer-danmaku-move {
animation: danmaku-center 8s linear !important;
}
}
.dplayer-danmaku-right {
&.dplayer-danmaku-move {
animation: danmaku 8s linear !important;;
}
}
}
&.dplayer-no-danmaku {