1.0.0 • Published 5 years ago
hk-pc-player
Licence
MIT
Version
1.0.0
Deps
37
Size
428 kB
Vulns
1
Weekly
0
hk-player.js
hk-player.js is a modern and full featured HTML5 video player
Features
- Size -
100kBminified and gzipped - 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 -
Open Local Subtitles,Open Local Video,Mini Progress Bar,Network DetectionandSubtitle Time Offset - Integration - Easy to integration with other dependencies:
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
Install
Install with npm:
$ npm install @baidu/haokan-video-player
Or install with yarn:
$ yarn add @baidu/haokan-video-player
import Artplayer from '@baidu/haokan-video-player';
Or umd builds are also available:
<script src="path/to/@baidu/haokan-video-player.js"></script>
Usage
<div class="haokan-video-player-app"></div>
var art = new Artplayer({
container: '.haokan-video-player-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