Embed a video player in a website that streams large MP4 files in segments to reduce initial load time and bandwidth usage.
Add HLS or DASH adaptive streaming to a web application with seamless quality-level switching.
Replace a default browser video element with a customizable player that handles FLV live streams.
Build a custom video player UI by swapping or extending xgplayer's modular plugin components.
Each format requires a separate plugin package (HLS, DASH, FLV have individual npm installs).
xgplayer is a web video player built by ByteDance, the company behind TikTok. It is designed to be embedded into websites and web applications to play video content in a browser. Developers add it to a webpage with a few lines of code, point it at a video file, and it handles the rest. The player is notable for how it handles MP4 video files. Standard browser video players download the entire file or rely on the server to support streaming. xgplayer can load an MP4 file in segments, which reduces how much data is transferred, allows switching between quality levels without interruption, and gives developers more control over buffering behavior. The README describes this as the key feature that sets it apart from typical web players. Beyond MP4, the player supports HLS and DASH, which are the two most common streaming formats used for live video and on-demand content at scale. There is also support for FLV, a format still used in some live streaming contexts. Each format is handled through a plugin, and the player's architecture is built around the idea that every feature, including UI controls, is a self-contained component that can be added, removed, or replaced. Installation uses npm, the standard package manager for JavaScript projects. The documentation site covers configuration options and the plugin system in more detail. The project is open source under the MIT license.
← bytedance on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.