Custom Native HTML5 Player with Shortcuts

Custom html5 player with shortcuts and videos with audio

Daily installs
Total installs
16 3 0
Applies to
All sites

Replaces the native html5 video player with a custom player. Additional features include skip buttons, rate control buttons, timeline tooltip, extra shortcuts, preventing context menu hijacking, plus remembering per-site volume settings and previously watched video times (continuing where you stopped watching).

It's configured to work with Imagus, and to pull and sync audio for videos hosted by Reddit. Imagus videos are set to be as large as the viewport allows while maintaining a 16:9 aspect ratio. I have no idea why anyone would wanna zoom larger than that, so the zoom shortcut is overridden to "sticky" videos. Imagus' built-in "sticky" is configurable, but this script is compatible with short right-click by default. There's a pretty clearly labeled setting you can change to correspond to a delay, but I found it buggier at preventing the default context menu, which is a PITA.

Additionally, while it doesn't alter Youtube video players, it does keep track of YT video times, so any previously watched videos pick up where you left off.

All shortcuts were adapted from Better-Chrome-Native-Video. IIRC, I made a couple minor adjustments, but you can find the full list of shortcuts there, and any adjustments commented in the code. The common ones are what you'd typically expect.

There's enough personal prefs that I should probably implement settings, but I'm a lazy bastard and it's already set the way I like it. Maybe if anyone uses it and cares, I will. Otherwise, they're pretty clearly listed and explained at the top of the script, so they should be pretty simple to modify.

This script replaces the native player GLOBALLY by default, which means there's a million and one things that can go wrong. It waits as long as feasible to execute, to avoid replacing non-native players. Even still, some sites and players are so poorly coded that custom players are even slower to initialize, so it runs additional checks for common player classes and ids to ignore. I don't run into any issues. Works where it should, and ignores where it should. If you do run into any issues like this, or anything else, provide a URL, and I'll check it out.

If you want it to run on locally loaded videos, you might need to "Allow access to file URLs" in the extension page of TamperMonkey or whichever userscript manager.

If you'd prefer that it only run on Reddit, or any other site, your userscript manager should provide user settings to override the global include.