# h5player: Tampermonkey Script for Enhanced HTML5 Video Playback

> h5player is a Tampermonkey userscript that attaches to every HTML5 video element on a web page and adds keyboard-driven controls, speed adjustment, screenshot capture, picture-in-picture, and experimental video download. It reaches video elements inside cross-domain iframes and shadow DOMs where most browser extensions stop.

**xxxily/h5player** — This software supports all audio and video websites, such as TikTok, YouTube, Bilibili, TED, Instagram, Twitter, etc. Features include: variable playback speed, screen capture, video download, custom settings, and extensions, etc., providing you with a pleasant online audio and video playback experience.

- Repository: https://github.com/xxxily/h5player
- Website: https://h5player.anzz.top
- Stars: 3,770 · Forks: 310
- Language: TypeScript
- License: GPL-3.0
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/xxxily-h5player

## What h5player Adds to Any HTML5 Video Page

h5player is a Tampermonkey userscript that enhances HTML5 video playback on any website by attaching a control layer to each video element on the page. The target user is someone who watches video regularly across multiple platforms and wants controls that the site's own player does not provide: precise speed adjustment in 0.1-step increments, frame-accurate screenshots, picture-in-picture, brightness and contrast adjustment, and the ability to store video files offline.

The README lists explicit platform support: Bilibili, TikTok, Tencent Video, Youku, iQIYI, Xigua Video, YouTube, Weibo Video, Zhihu Video, Sohu Video, Netease Open Class, Baidu Netdisk, AliYun Disk, TED, Instagram, and Twitter. The stated principle is broader: any page that uses HTML5 video tags is supported. A Telegram community group is available at t.me/h5player. The script is at version 4.3.5, written in TypeScript and built with Rollup.

## Cross-Domain Iframe and Shadow DOM Interception

The README describes a key technical capability that distinguishes h5player from many browser extensions: it reaches video elements embedded inside cross-domain iframes and shadow DOMs. Standard browser extension content scripts are restricted by the same-origin policy in certain contexts, but Tampermonkey's script injection surface allows h5player to reach further.

The README lists multi-instance support as a specific technical feature, noting compatibility with platforms like Twitter and Instagram, which load multiple video elements simultaneously. Per-instance progress tracking and speed control memory persist settings across page loads for each video instance individually. Cross-tab control of picture-in-picture is also supported, meaning the floating picture-in-picture window can be managed across browser tabs. Audio instance control is listed separately as a feature, covering cases where the page's audio element is separate from its video element.

## Installing h5player via Tampermonkey

Installation has two steps. First, the Tampermonkey browser extension must be installed. The README links to https://www.tampermonkey.net and notes support for Chrome, Edge, Firefox, Safari, Opera, and domestic Chinese browsers. Once Tampermonkey is installed, the h5player script installs in one step by opening the direct install link from GreasyFork:

```
https://update.greasyfork.org/scripts/381682/HTML5%E8%A7%86%E9%A2%91%E6%92%AD%E6%94%BE%E5%99%A8%E5%A2%9E%E5%BC%BA%E8%84%9A%E6%9C%AC.user.js
```

Tampermonkey presents a confirmation dialog before installing. The official site at h5player.anzz.top offers the same install link and a detailed installation tutorial at h5player.anzz.top/home/install.html. After installation, visiting any page with an HTML5 video element activates the script. The script's GreasyFork listing is at greasyfork.org/scripts/381682.

## Keyboard Shortcut Architecture and Speed Controls

h5player maps an extensive set of keyboard shortcuts to video controls. Speed adjusts in 0.1-step increments: C increases playback speed and X decreases it, while Z returns to normal speed. The video display can be scaled in 0.05 steps with shift+C (enlarge) and shift+X (shrink), and shift+Z restores the original size.

Seeking uses arrow keys: the right and left arrows seek 5 seconds, while Ctrl+right and Ctrl+left seek 30 seconds. Volume uses up and down arrows for 5% adjustments, and Ctrl+up/Ctrl+down for 20% adjustments. Image quality controls cover brightness (E/W), contrast (T/R), saturation (U/Y), hue (O/I), and blur (K/J), with Q resetting the image. S rotates the screen 90 degrees, M flips horizontally, and shift+M flips vertically.

Shift+P enters or exits picture-in-picture. Shift+S captures the current frame as a screenshot. D and F step one frame backward or forward for precise screenshot framing. N advances to the next video or chapter on supported websites. Enter toggles full-screen, and shift+Enter toggles web full-screen. The ctrl+\ shortcut toggles whether all h5player shortcuts are active across the entire page, which is useful on pages where the site's own keyboard handling would otherwise interfere.

## Video Download, Live Stream Extraction, and Offline Storage

The README marks the video download feature as experimental, triggered by shift+D. Beyond the direct download shortcut, the README documents offline storage of audio and video files and live video stream extraction as separate technical features. These are described in the README as use cases for viewing content locally, sending files privately, and creating an offline library.

The experimental label on shift+D is significant: the README does not document which platforms support download reliably, known failure modes, or the format of the downloaded file. Live stream extraction is listed as a distinct capability from the download shortcut. Customization of behavior beyond the defaults is possible through the configuration system documented at h5player.anzz.top/home/customConfiguration.html. The README also mentions paid customization by the author for users who need complex features and do not want to configure the script themselves.

## GPL License, Experimental Features, and Deployment Limits

h5player is released under GPL-3.0. Any software that incorporates h5player source code in a way that constitutes a derivative work must also be distributed under GPL-3.0. For commercial developers who need to integrate this functionality into a proprietary product, the license is a hard constraint. The README does not document a commercial license exception or a dual-license arrangement.

The script requires Tampermonkey as a prerequisite: environments that block browser extensions, such as corporate-managed devices or certain institutional networks, will prevent installation. The README does not document a minimum browser version, a minimum Tampermonkey version, or behavior when the browser blocks the userscript from accessing a cross-domain iframe. The video download feature is explicitly marked experimental; its behavior on specific platforms is not documented in the README. The feature manual at h5player.anzz.top/home/feature.html and the FAQ at h5player.anzz.top/home/q&a.html are the documented sources for further detail.

## h5player vs. VideoSpeedController

VideoSpeedController is a well-known standalone Chrome extension that adds keyboard controls for HTML5 video playback speed. The scope difference is clear: VideoSpeedController focuses on playback rate, while h5player covers speed, screenshot, picture-in-picture, brightness/contrast/saturation adjustment, frame stepping, experimental download, and offline storage.

The dependency difference matters for deployment. VideoSpeedController installs as a self-contained Chrome extension; h5player requires Tampermonkey as an additional layer. For users who need only speed control with minimal prerequisites, VideoSpeedController avoids that dependency. h5player is the appropriate choice when cross-domain iframe support is required, when the user needs screenshot or download capability, or when they are using Firefox or Safari, where VideoSpeedController is not available but Tampermonkey is.

## Conclusion

h5player is appropriate for anyone who watches video regularly across web platforms and wants consistent keyboard controls and screen capture. The GPL-3.0 license means it cannot be embedded in closed-source software without licensing implications. The experimental video download feature should be tested on the specific platforms in scope before being relied on. The last push was on 2026-08-22, and the primary installation point is GreasyFork script ID 381682.

## FAQ

### Which browsers does h5player support?

h5player runs through the Tampermonkey extension, which the README states supports Chrome, Edge, Firefox, Safari, Opera, and several domestic Chinese browsers. Any browser that supports Tampermonkey and HTML5 video should work with the script.

### Does h5player work inside iframes or shadow DOMs?

Yes. The README lists cross-domain iframe support and shadow DOM compatibility as explicit technical features, and multi-instance support for platforms like Twitter and Instagram, which embed multiple video elements in complex page structures.

### Is the video download feature in h5player reliable?

The README marks the shift+D download feature as experimental. It does not document which platforms support it consistently, what file format the download produces, or known failure cases.

## Sources

- [Issues](https://github.com/xxxily/h5player/issues)
- [License: GPL-3.0](https://github.com/xxxily/h5player/blob/master/LICENSE)
- [Project website](https://h5player.anzz.top)
- [README](https://github.com/xxxily/h5player/blob/master/README.md)
- [xxxily/h5player on GitHub](https://github.com/xxxily/h5player)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/xxxily-h5player
