bishaldahal/M3U8-HLS-Player-with-Custom-Controls
关于
This extension features Youtube-like keyboard shortcuts for playing HLS or m3u8 content.
安全与隐私可以做什么
- Plays .m3u8 (HLS via hls.js) and .mpd (DASH via dash.js) links, including live streams
- Opens stream links automatically when you click or navigate to them
- Optional stream detection: lists the streams a page plays in the toolbar popup and opens them with the headers that page used
- Per-host site headers (Referer, Origin, cookies...) for streams that only play on their own site
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 0
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文M3U8/HLS/DASH Player with Custom Controls
A browser extension that plays M3U8/HLS and MPD/DASH streams directly in the browser, with keyboard shortcuts, Picture-in-Picture, frame stepping, subtitles, watch history and resume.
Features
- Plays
.m3u8(HLS via hls.js) and.mpd(DASH via dash.js) links, including live streams - Opens stream links automatically when you click or navigate to them
- Optional stream detection: lists the streams a page plays in the toolbar popup and opens them with the headers that page used
- Per-host site headers (
Referer,Origin, cookies...) for streams that only play on their own site - Live streams keep buffering while paused (configurable) and resume where you left off
- Controls built on media-chrome, plus keyboard shortcuts
- Picture-in-Picture, frame-by-frame navigation, playback speed from 0.1× to 10×
- Subtitle styling: size, color, background, font and edge style
- Watch history with resume, pinning and renaming (on by default in regular windows, off in private windows)
- Widevine license configuration for DASH DRM on Chromium browsers
Keyboard shortcuts
| Key | Action | Key | Action |
|---|---|---|---|
Space/k |
Play / pause | f |
Toggle fullscreen |
← / → |
Seek −/+ 10 s | j / l |
Seek −/+ 5 s |
↓ / ↑ |
Volume −/+ 10 % | m |
Toggle mute |
< / > |
Speed −/+ 0.1 | - / + |
Speed −/+ 0.5 |
, / . |
Previous / next frame | 0–9 |
Seek to 0–90 % |
Home |
Seek to start | End |
Seek to end |
p / P |
Enter / exit PiP | ? |
Toggle the shortcuts dialog |
Streams that only play on their own site
Some hosts answer with 403 Forbidden unless the request looks like it came from their own page.
- Detect streams on pages is on by default and can be turned off in the popup or Settings. Start the video on a site, then open the popup and pick its stream from On this page. The player sends the same headers the page did, from its own tab only, and forgets them when that tab closes.
- Site headers: in Settings, or from the Site headers button on a player error, save headers for a stream host. They are sent with every request the player makes to that host.
Nothing captured or saved here leaves your browser. See PRIVACY.md.
History and private windows
Watch history is on by default in regular windows. Settings → Watch History → Save history in private/incognito windows is unchecked by default, so private playback does not save history or resume positions. Check that box to opt into shared history in private windows. The main watch-history switch disables saving everywhere. Existing saved preferences are preserved on upgrade, and disabling history does not delete earlier entries.
For private-window detection, enable Allow in incognito / InPrivate (Chrome / Edge) or Run in Private Windows (Firefox) in the browser's extension settings, then reload the page and start playback. Detection is independent of history and works even when history is off. Detected streams open in the same private window. Advanced HLS inspection is skipped in Firefox private windows; basic HLS/DASH detection remains available.
DASH DRM (Chromium)
If an encrypted .mpd stream fails with a key-system error, the player shows a dialog where you can enter:
- a Widevine license URL
- optional request headers, such as
Authorization: Bearer <token> - an optional robustness level, such as
SW_SECURE_DECODE
You can remember these values per stream host. They are stored locally in your browser and never sent anywhere except the license server you configure. See PRIVACY.md.
Install from source
You need Node.js 22 or later (.nvmrc).
git clone https://github.com/bishaldahal/M3U8-HLS-Player-with-Custom-Controls.git
cd M3U8-HLS-Player-with-Custom-Controls
npm ci
npm run fetch:vendor # downloads pinned, hash-verified player libraries
npm run build # outputs dist/chrome and dist/firefox
Then load the unpacked build:
- Chrome / Edge: open
chrome://extensions, enable Developer mode, click Load unpacked and selectdist/chrome - Firefox: open
about:debugging#/runtime/this-firefox, click Load Temporary Add-on and selectdist/firefox/manifest.json
Read docs/building.md for the details of the build pipeline.
Development
| Command | Description |
|---|---|
npm run build |
Build both targets into dist/ |
npm run build:chrome / build:firefox |
Build one target |
npm run start:chrome / start:firefox |
Launch a browser with the build loaded (web-ext) |
npm run start:android |
Run the build in Firefox for Android over adb |
npm test / npm run test:watch |
Run the unit tests (Vitest) |
npm run lint / npm run typecheck |
ESLint and TypeScript checks |
npm run format |
Format with Prettier |
npm run zip |
Package dist/ and the sources into artifacts/ |
docs/architecture.md describes how the code is organized.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md and our Code of Conduct first. To report a security problem, follow SECURITY.md instead of opening a public issue.
Acknowledgements
Built on hls.js, dash.js, media-chrome and their companion custom elements.
探索相关项目
加载中…