mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 22:17:58 +01:00
use video instead lol
This commit is contained in:
parent
455d93b15b
commit
3eba5ec6f5
1 changed files with 8 additions and 8 deletions
|
@ -724,27 +724,27 @@ document.addEventListener('keydown', function(event) {
|
||||||
// Toggle play/pause with the Spacebar and prevent control activation
|
// Toggle play/pause with the Spacebar and prevent control activation
|
||||||
if (event.key === ' ' || event.key === 'Spacebar') {
|
if (event.key === ' ' || event.key === 'Spacebar') {
|
||||||
event.preventDefault(); // Prevent default action, like activating buttons
|
event.preventDefault(); // Prevent default action, like activating buttons
|
||||||
if (player.paused()) {
|
if (video.paused()) {
|
||||||
player.play();
|
video.play();
|
||||||
} else {
|
} else {
|
||||||
player.pause();
|
video.pause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggle fullscreen with the F key
|
// Toggle fullscreen with the F key
|
||||||
if (event.key === 'f' || event.key === 'F') {
|
if (event.key === 'f' || event.key === 'F') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (player.isFullscreen()) {
|
if (video.isFullscreen()) {
|
||||||
player.exitFullscreen();
|
video.exitFullscreen();
|
||||||
} else {
|
} else {
|
||||||
player.requestFullscreen();
|
video.requestFullscreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggle mute with the M key
|
// Toggle mute with the M key
|
||||||
if (event.key === 'm' || event.key === 'M') {
|
if (event.key === 'm' || event.key === 'M') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
player.muted(!player.muted());
|
video.muted(!video.muted());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.ctrlKey || event.metaKey || event.altKey) {
|
if (event.ctrlKey || event.metaKey || event.altKey) {
|
||||||
|
@ -759,7 +759,7 @@ document.addEventListener('keydown', function(event) {
|
||||||
var number = ewhich - sub;
|
var number = ewhich - sub;
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
player.currentTime(player.duration() * number * 0.1);
|
video.currentTime(video.duration() * number * 0.1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue