About this project

xgplayer is a web video player library built around a componentized architecture. Its UI controls are designed as separate, detachable components, allowing developers to customize or replace interface elements independently from core playback. Beyond the UI layer, xgplayer reduces dependence on traditional video loading, buffering, and format handling. For MP4 content that does not support streaming, it can use staged loading, which enables clearer load control, potential bandwidth savings, and smoother quality switching. The project also integrates support for FLV, HLS, and DASH workflows, covering both on-demand and live scenarios. It is distributed via npm and can be initialized with a container element and video URL. Additional behavior can be extended through built-in plugins, custom plugins, or configuration options, while unwanted built-in plugins can be disabled through ignores. The repository includes fixture demos and yarn scripts for debugging the core player as well as HLS, FLV, and MP4-related modules.