forked from f0ck/f0ckv2
sirx: und weg damit :D
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
if(elem = document.querySelector("#my-video")) {
|
||||
const video = new v0ck(elem);
|
||||
document.addEventListener("keydown", e => {
|
||||
if(e.key === " ") {
|
||||
if(e.key === " " && e.target.tagName !== "INPUT") {
|
||||
video[video.paused ? 'play' : 'pause']();
|
||||
document.querySelector('.v0ck_overlay').classList[video.paused ? 'remove' : 'add']('v0ck_hidden');
|
||||
}
|
||||
@ -26,7 +26,7 @@
|
||||
"r": clickOnElementBinding("#random")
|
||||
};
|
||||
document.addEventListener("keydown", e => {
|
||||
if(e.key in keybindings) {
|
||||
if(e.key in keybindings && e.target.tagName !== "INPUT") {
|
||||
e.preventDefault();
|
||||
keybindings[e.key]();
|
||||
}
|
||||
@ -144,19 +144,6 @@
|
||||
analyser.getByteFrequencyData(data);
|
||||
draw(data);
|
||||
}
|
||||
/*function draw(data) {
|
||||
data = [ ...data ];
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
const space = canvas.width / data.length;
|
||||
const sstyle = getComputedStyle(document.body).getPropertyValue("--accent");
|
||||
data.forEach((value, i) => {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(space * i, canvas.height);
|
||||
ctx.lineTo(space * i, canvas.height - value);
|
||||
ctx.strokeStyle = sstyle;
|
||||
ctx.stroke();
|
||||
});
|
||||
}*/
|
||||
function draw(data) {
|
||||
data = [ ...data ];
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
|
Reference in New Issue
Block a user