A fullscreen live stream player frontend built with React, Vite, and Artplayer. It supports FLV and HLS playback with automatic reconnection and in-player source switching.
- FLV and HLS Support: Play FLV and HLS (m3u8) live streams.
- In-Player Switching: Switch between configured FLV and HLS sources from the Artplayer controls.
- FLV First: Prefer the FLV source at startup and fall back to HLS when FLV is not configured.
- Autoplay: Attempt playback with sound when the page opens and show an alert when the browser blocks it.
- Auto-Reconnect: Automatically attempts to reconnect on network errors.
- Fullscreen Player: Artplayer fills the browser viewport without external chrome or borders.
- Environment Configurable: Easily configure stream URLs via environment variables.
-
Fork/Clone this repository to your GitHub/GitLab account.
-
Log in to the Cloudflare Dashboard and navigate to Pages.
-
Click Create a project > Connect to Git.
-
Select your repository.
-
Configure the build settings:
- Framework preset: Vite
- Build command:
npm run build - Build output directory:
dist
-
Environment Variables: Add the following environment variables in the Settings > Environment variables section of your Cloudflare Pages project:
Variable Name Description Example VITE_FLV_URLURL for the FLV stream source https://example.com/live.flvVITE_HLS_URLURL for the HLS (m3u8) stream source https://example.com/live.m3u8You can configure either source or both. The source selector appears in Artplayer when both URLs are available.
-
Click Save and Deploy.
- Clone the repository.
- Install dependencies:
npm install
- Create a
.envfile based on.env.exampleand set your stream URL.cp .env.example .env
- Start the development server:
npm run dev
AGPL-3.0