Skip to content

Latest commit

Β 

History

359 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Ί IPTV Player β€” Watch Live TV Channels

Next.js React Tailwind CSS Node.js License: GPL v3

A modern, high-performance, and premium web-based IPTV player built with Next.js 16, React 19, and Tailwind CSS v4. Stream high-quality live TV channels directly from official broadcast sources with a cinematic user interface.

🌐 Live Web Player: tv.shajon.dev


✨ Features

  • 🎬 Advanced Video Engine: Seamless playback for HLS, DASH (with ClearKey DRM), and MPEG-TS streams using native and custom engines (hls.js, shaka-player, mpegts.js).
  • πŸŽ›οΈ Cinematic Player Experience: Custom video quality selection with precise Mbps analytics, Picture-in-Picture (PiP), and double-tap seek.
  • πŸ›‘οΈ Security & Proxy Routing: Built-in secure proxy to bypass CORS and Geo-blocking with custom headers, protected by Anti-SSRF DNS validation.
  • ⚑ High-Performance Architecture: Smart proxy bypass for direct streams.
  • πŸ’Ύ Local Playlist Caching: Auto-caches default and custom playlists (IndexedDB) for instant load speeds and offline channel accessibility.
  • ✨ Premium Glassmorphic UI: Responsive interactive channel grid, seamless skeleton loaders, sticky headers, knockout bracket cards, and a GPU-optimized 3D CSS cyber background.

πŸ› οΈ Technology Stack


πŸš€ Getting Started

Prerequisites

Ensure you have Node.js (v22.19.0 or newer) installed.

Important

The dependency undici@8.4.1 requires Node.js version v22.19.0 or higher. Lower versions will fail to build or compile.

Installation

  1. Clone this repository:

    git clone --depth=1 https://github.com/SHAJON-404/iptv.git
    cd iptv
  2. Configure environment variables: Create a .env file in the root directory:

    # Site Configuration
    NEXT_PUBLIC_SITE_URL=http://localhost:3000
    
    # Popup Configuration
    SHOW_POPUP=True
    
    # Developer/Local Subnet Origins (CORS validation bypass)
    ALLOWED_DEV_ORIGINS=live.shajon.dev,192.168.0.57
    
    # Default Playlists Domain (Dynamic available_playlist.json domain)
    PLAYLIST_DOMAIN=iamshajon.com
  3. Install dependencies:

    npm install
  4. Run the development server:

    npm run dev
  5. Open http://localhost:3000 in your browser.

Production Build & Running

To build and run the application in production mode:

npm run build
npm start

πŸ–₯️ Desktop Application (Windows & Linux)

This repository includes support for compiling the player into a standalone desktop application (.exe for Windows, and installers like .deb, .rpm, .AppImage for Linux) using Electron.

The desktop application runs the Next.js production server locally in a background process on a dynamically allocated port, serving the dynamic pages, secure CORS stream proxies, and local API handlers directly inside a native window.

Local Development

  1. Start the Next.js dev server:
    npm run dev
  2. Launch Electron (in a separate terminal) pointed to the local dev server:
    npm run electron:dev

Compiling Installers Locally

  • Local Unpacked Dry-Run (Fast testing):
    npm run electron:pack
  • Compile Windows installer (dist/IPTV Player Setup 3.3.0.exe):
    npm run electron:dist-win
  • Compile Linux installers (AppImage, deb, rpm):
    npm run electron:dist-linux

Configuration Setup

When launched, the desktop app searches for a configuration .env file in the user's home folder config path (%APPDATA%/iptv on Windows or ~/.config/iptv on Linux). If it doesn't exist, a default template is generated.

πŸ“± Mobile Application (Android)

This repository includes first-class support for compiling the player into a high-performance native Android application using Capacitor.

To support advanced proxy-routing, CORS-bypassing, and dynamic playlist handling directly on-device without needing a companion PC or ADB loopback tunnels:

  • The Android app starts a native background Java HTTP daemon on loopback 127.0.0.1:3000.
  • The Web View automatically resolves API and proxy calls dynamically to the device's native local daemon.

Local Development & Build Commands

  • Prepare and Sync static Next.js assets to Capacitor:
    npm run cap:sync
  • Compile Android debug APK (android/app/build/outputs/apk/debug/app-debug.apk):
    npm run android:build-debug
  • Compile Android production release APK:
    npm run android:build-release
  • Open Android Studio to manage native build configurations:
    npm run cap:open-android
  • Auto-Generate Android Launcher Icons & Adaptive Brand Assets (from public/logo.png):
    npx -y @capacitor/assets generate --android

Docker Deployment

You can deploy the application using the preconfigured multi-stage Dockerfile (optimized for Node.js 22):

docker build -t iptv-player .
docker run -p 3000:3000 iptv-player

πŸ”„ Upgrading Dependencies

To check for and upgrade all project dependencies to their latest versions:

  1. Check and upgrade package specifications:
    npx npm-check-updates -u
  2. Install the upgraded versions:
    npm install
  3. Verify the build output:
    npm run build

⚠️ Disclaimer

This repository does not host, store, retransmit, or own any television channels or media content. The web player only processes and plays data from the user's own provided playlist files (M3U or JSON) or publicly available stream links. Channel availability may change, expire, or stop working at any time.

If you are the copyright owner of any content and would like it removed, please refer to our Security & DMCA Policy or contact the developer directly.


πŸ“„ License & Compliance

This project is open-source software licensed under the GNU General Public License v3 (GPLv3).

Open Source Compliance Guidelines:

  1. Copyleft Protection & Mandatory Open Source: You are free to use, modify, and build upon everything in this repository, but any derivative player, application, or database MUST remain fully open-source and distributed under the same GPLv3 license.
  2. Preserve Developer Attribution: You must preserve all S. SHAJON copyright, developer profile links (GitHub, Telegram, Facebook), and licensing labels in both the user interface and code files.
  3. No Commercial Ads or Betting/Gambling Promotions: If you build your own IPTV player or service based on this codebase, database, or resources, you are strictly prohibited from integrating or displaying any form of commercial advertisements, pop-up ads, redirect ads, or betting/gambling promotions of any kind.

Developed with β™₯ by S. SHAJON. Follow GitHub Profile for updates.

About

A premium web-based IPTV player built with Next.js 16 & Tailwind CSS v4. Features 7500+ live TV channels, HLS & DASH (ClearKey DRM) streaming, and a high-performance 3D CSS grid UI.

Topics

Resources

Security policy

Stars

66 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages