~cadence/tube-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 3

[PATCH cloudtube] Fix broken navigation shortcuts on videos

~lomanic
Details
Message ID
<161298844619.11706.14892242452199531526-0@git.sr.ht>
DKIM signature
missing
Download raw message
Patch: +2 -2
From: Lomanic <lomanic@hotmail.fr>

Namely, Alt+⬅️/Alt+➡️ (history navigation) and ⬆️/⬇️ vertical scrolling
---
 html/static/js/player.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/html/static/js/player.js b/html/static/js/player.js
index d32deec..62249a8 100644
--- a/html/static/js/player.js
+++ b/html/static/js/player.js
@@ -197,7 +197,7 @@ video.addEventListener("dblclick", event => {

document.addEventListener("keydown", event => {
	if (["INPUT", "SELECT", "BUTTON"].includes(event.target.tagName)) return
	if (event.ctrlKey || event.shiftKey) return
	if (event.ctrlKey || event.shiftKey || event.altKey) return
	let caught = true
	if (event.key === "j" || event.key === "n") {
		relativeSeek(-10)
@@ -210,7 +210,7 @@ document.addEventListener("keydown", event => {
	} else if (event.key === "ArrowRight") {
		relativeSeek(5)
	} else if (event.key === "ArrowUp" || event.key === "ArrowDown") {
		// no-op
		return
	} else if (event.key >= "0" && event.key <= "9") {
		video.currentTime = video.duration * (+event.key) / 10
	} else if (event.key === "f") {
-- 
2.30.0
Details
Message ID
<72e7d5e8-a548-4371-974d-67201714e0df@disroot.org>
In-Reply-To
<161298844619.11706.14892242452199531526-0@git.sr.ht> (view parent)
DKIM signature
pass
Download raw message
I planned to use up/down for volume controls, but haven't implemented it 
yet. Thoughts on that? Page up/down can still be used for keyboard 
scrolling.
Details
Message ID
<20210212004912.cd4570a24f38eedfda877197@disroot.org>
In-Reply-To
<161298844619.11706.14892242452199531526-0@git.sr.ht> (view parent)
DKIM signature
pass
Download raw message
>  	} else if (event.key === "ArrowUp" || event.key === "ArrowDown") {
> -		// no-op
> +		return
>  	} else if (event.key >= "0" && event.key <= "9") {

I didn't include this part of the patch for the reasons previously
mentioned. The first part was applied.
bopol
Details
Message ID
<507bbed6-8f5f-e232-ce54-a4f6e3b5e297@e.email>
In-Reply-To
<72e7d5e8-a548-4371-974d-67201714e0df@disroot.org> (view parent)
DKIM signature
pass
Download raw message
 > Thoughts on that?

Please remove that until it's implemented.
Otherwise I would override it **only** if the video is playing.
Details
Message ID
<VI1PR0701MB23664AD3436EABC3A37241C8D18B9@VI1PR0701MB2366.eurprd07.prod.outlook.com>
In-Reply-To
<20210212004912.cd4570a24f38eedfda877197@disroot.org> (view parent)
DKIM signature
missing
Download raw message
For whatever reason I cannot reply to your previous comment (didn't receive email), and the website doesn't provide a way to do so (yet, hopefully).

Please don't break this kind of basic function (scrolling), this is not the same thing as Page Up/Down, you can't presume how people navigate your website.

Plus, volume is already controlled by Up/Down arrows when the video is focused (on Firefox at least).

As another example, scrolling with arrows is not broken on Invidious.
Details
Message ID
<25ed97b4-db9a-43ce-b47b-da8dd69d3972@disroot.org>
In-Reply-To
<VI1PR0701MB23664AD3436EABC3A37241C8D18B9@VI1PR0701MB2366.eurprd07.prod.outlook.com> (view parent)
DKIM signature
pass
Download raw message
You're right. I will remove the up/down catcher.
Reply to thread Export thread (mbox)