Custom Native HTML5 Player with Shortcuts

Custom html5 player with shortcuts and v.redd.it videos with audio

< Feedback on Custom Native HTML5 Player with Shortcuts

Review: Good - script works

§
Posted: 2021-01-31
Edited: 2021-01-31

If you found that your old Imagus keybinds arent working like they did with Imagus after using this script, here is what i did to fix this issue for myself.

Open your script in your script manager(tampermonkey in my case) by:

left clicking the extension icon in the top right of your browser, then click "Dashboard".

you should now see all the user scripts you have downloaded.

left click on the text "Custom Native HTML5 Player with Shortcuts".

you should now see the code for this script.

Press Ctrl + F to 'Find' and type 75 into the 'Find' search box in the bottom left and press enter.

you should now see a list of Keybinds just like this one "75: shortcutFuncs.togglePlay, // K".

This is the code that sets the keybind "K" to the "togglePlay" function.

however the 'K' that you see is not code at all, it is 'commented out'(google this term if you want) with the two forwardslashes behind it '//'.

the actual part of the code that binds the key to the function is the number on the very left side.

these numbers are Keycodes, google 'javascript keycodes' to find a list of keycodes so you know what to replace these numbers with.

once you are done changing the numbers to the new numbers associated with the key of your choice then press Ctrl + S and click "modify" in the top left.

one thing not in this section of the code that i also wanted to change was the keybind to enter "fullscreen" mode.

with this script it is keybound to holding right click for about a second or pressing enter.

lets change the enter keybind because i don't know how to change the right click one :D.

in order to change this Ctrl + F and search for 'keyCode === 90' and replace 90, which is keycode talk for enter, with the keycode of your choice.

i don't know how to code and i figured this out from just googling stuff like "javascript keybinds" and "html hide video controls".

which were things related to the problems i wanted fixed.

Post reply

Sign in to post a reply.