mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-10 04:36:15 -08:00
bdec2891518553172e6911c528b21684c4c3daa2
ArtPlayer.js
🎨 ArtPlayer.js is a modern and full featured HTML5 video player
Features
- File Size -
artplayer.js≈90kbandartplayer.css≈20kb - Subtitle - Support for
.VTT,.ASSand.SRTformats - Customizable -
Right Click Menu,Business Layer,Video ControllerandSettings Panel - Controller -
Quality Switch,Subtitle Switch,Play Speed,Aspect Ratio,Video Flip,Fullscreen,Picture In Picture,Screenshot,Thumbnail,Adaptive Size,HighlightandHotkey... - Built-in -
Auto PIP Mode,Open Local Subtitles,Open Local Video,Mini Progress Bar,Network DetectionandSubtitle Time Offset - Integration - Support integration with other dependencies, like:
flv.js,hls.js,dash.js,shaka-player,webtorrent... - Code - Vanilla
ES6andSASS, Highly decoupled code, clear structure, easy to track bugs and add new features - Document - Detailed interface documentation and rich code demo
- API - Rich interface and response events, easy to interface with business or custom plugin
- I18N - support for internationalization of controls
Ecosystem
| Project | Description | Demo |
|---|---|---|
| artplayer-plugin-danmuku | Danmuku plugin for ArtPlayer | demo |
| artplayer-plugin-gif | Gif plugin for ArtPlayer | demo |
| artplayer-plugin-backlight | Backlight plugin for ArtPlayer | demo |
| artplayer-plugin-playlist | Playlist plugin for ArtPlayer | demo |
| artplayer-tool-thumbnail | Thumbnail tool for ArtPlayer | demo |
| artplayer-tool-github | Github api tool for ArtPlayer | demo |
| artplayer-react | React Component for Artplayer | demo |
| artplayer-vue | Vue Component for Artplayer | demo |
Demo
Checkout the demo from Github Pages
Document
Checkout the Document from Github Pages
Install
Install with npm
$ npm install artplayer
Or install with yarn
$ yarn add artplayer
import Artplayer from 'artplayer';
import 'artplayer/dist/artplayer.css';
Or umd builds are also available
<link rel="stylesheet" href="path/to/artplayer.css" />
<script src="path/to/artplayer.js"></script>
Will expose the global variable to window.Artplayer.
Usage
<div class="artplayer-app"></div>
var art = new Artplayer({
container: '.artplayer-app',
url: 'path/to/video.mp4',
});
Contribution
Installation dependency
$ npm install
$ npm run bootstrap
Run the developer mode and select the project you want to develop
$ npm run dev
Open web server
$ npm start
Donations
We accept donations through these channels:
QQ Group
License
MIT © Harvey Zack
Languages
JavaScript
89%
Less
9.8%
TypeScript
0.7%
Vue
0.3%
HTML
0.1%

