Gravity
DRM IPTV Player
Install / Use
/learn @fairy-root/GravityREADME
Gravity
A modern, feature-rich network stream player built with React and Shaka Player. Gravity provides a sleek interface for managing and playing IPTV streams, HLS, DASH, and DRM-protected content directly in your browser.
Screenshots
Desktop

Mobile
| Library View | Sidebar Drawer |
|:---:|:---:|
|
|
|
Features
- Multi-Format Support - Play HLS, DASH, and smooth streaming content
- DRM Playback - Widevine and ClearKey decryption support
- M3U Import - Bulk import channels from M3U/M3U8 playlist files
- Channel Library - Organize streams with custom groups and logos
- Persistent Storage - Library and preferences saved locally
- Search and Filter - Quickly find channels across your library
- Multiple View Modes - Grid and list layouts with adjustable sizing
- Custom Headers - Set User-Agent, Referrer, and Authorization headers
- Responsive Design - Optimized for desktop and tablet displays
Live Demo
Experience Gravity without installation:
https://gravityiptv.netlify.app/
Getting Started
Prerequisites
- Node.js 18+
- npm or yarn
Installation
- Clone the repository:
git clone https://github.com/fairy-root/gravity.git
cd gravity
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
Production Build
npm run build
The optimized build will be generated in the dist directory.
Usage
Playing a Stream
- Enter the stream URL in the sidebar configuration panel
- Optionally configure DRM settings if the stream is protected
- Click Play to start playback
Importing M3U Playlists
- Click the Import M3U button in the sidebar
- Select your
.m3uor.m3u8file - Channels will be automatically parsed and added to your library
DRM Configuration
For DRM-protected streams:
- ClearKey - Enter key pairs in
keyId:keyformat (comma-separated for multiple) - Widevine - Provide the license server URL
Custom Headers
Configure request headers for streams that require authentication:
- User-Agent - Custom browser identification
- Referrer - Origin URL for hotlink protection
- Authorization - Bearer token or API key
Technology Stack
| Component | Technology | |-----------|------------| | Framework | React 19 | | Build Tool | Vite 7 | | Player Engine | Shaka Player 4.x | | Styling | Vanilla CSS | | Storage | localStorage |
Project Structure
gravity/
├── public/
├── src/
│ ├── components/
│ │ ├── Player.jsx
│ │ ├── StreamConfig.jsx
│ │ ├── Library.jsx
│ │ └── ConfirmModal.jsx
│ ├── utils/
│ │ └── m3uParser.js
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── index.html
├── package.json
└── vite.config.js
Contributing
Contributions are welcome. Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
Donation
Your support is appreciated:
- USDt (TRC20):
TGCVbSSJbwL5nyXqMuKY839LJ5q5ygn2uS - BTC:
13GS1ixn2uQAmFQkte6qA5p1MQtMXre6MT - ETH (ERC20):
0xdbc7a7dafbb333773a5866ccf7a74da15ee654cc - LTC:
Ldb6SDxUMEdYQQfRhSA3zi4dCUtfUdsPou
Author
- GitHub: FairyRoot
- Telegram: @FairyRoot
License
This project is licensed under the MIT License. See the LICENSE file for details.
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
