README

xgplayer

xgplayer provides a flexible, plugin-based media player for web applications. Its UI components, loading strategies, and format integrations can be composed independently.

Documentation

Installation

npm install xgplayer

Usage

<div id="player"></div>
import Player from 'xgplayer'
import 'xgplayer/dist/index.min.css'

const player = new Player({
  id: 'player',
  url: 'https://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/xgplayer-demo.mp4'
})

See the configuration documentation for additional player options.

Plugins

xgplayer provides built-in UI plugins and optional streaming or feature packages. See the plugin documentation for available integrations.

Development

The repository uses Yarn 1.x. Fixture commands start local demos for each format:

yarn
yarn dev:xgplayer
yarn dev:hls
yarn dev:flv
yarn dev:mp4

Release

See the release guideline for stable and prerelease workflows.

License

By using xgplayer, you agree to the following terms:

  1. xgplayer is licensed under the MIT License.
  2. You authorize the xgplayer project to display the logo of a business using xgplayer on the project website.

评论

暂无评论