https://github.com/dblate/larkplayer
🚀 A lightweight & flexible web player :)
https://github.com/dblate/larkplayer
html5 html5-video javascript larkplayer player video video-player videojs
Last synced: 7 months ago
JSON representation
🚀 A lightweight & flexible web player :)
- Host: GitHub
- URL: https://github.com/dblate/larkplayer
- Owner: dblate
- License: mit
- Created: 2018-01-05T05:43:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-17T05:42:13.000Z (about 5 years ago)
- Last Synced: 2024-12-10T00:42:06.720Z (7 months ago)
- Topics: html5, html5-video, javascript, larkplayer, player, video, video-player, videojs
- Language: JavaScript
- Homepage:
- Size: 4.44 MB
- Stars: 101
- Watchers: 5
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: readme-en.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
larkplayer
English | 䏿–‡## Overview
larkplayer is a light and flexible web player
* Lightweight, uglify + gzip < 12kb
* Solve most compatibility issues, such as full screen, mobile inline playback, etc
* Provide an event mechanism to proxy native events and allow custom events
* Provide plugin mechanism to support multiple plugin types
* Pure javascript, no specific framework dependenciesWe separate many functions into [plugins](./docs/plugins/plugin-list), also you can [build your own plugin](./docs/plugins)
Check out [live examples](./examples)
## Download
NPM
```
npm install larkplayer
```CDN
``````
## Quick Start
#### Via script
```html
  larkplayer quick start
Please upgrade or replace your browser to support html5 video
var player = larkplayer('my-video', {
width: 640,
height: 360
}, function () {
console.log('player is ready');
});player.on('firstplay', function () {
console.log('firstplay');
});// support all the standard events
player.on('play', function () {
console.log('play');
});
player.on('ended', function () {
console.log('ended');
player.src('http://www.w3school.com.cn/i/movie.ogg');
player.play();
});
```
#### Via npm & es6
```javascript
import larkplayer from 'larkplayer';const player = larkplayer('video-el');
```
## Document
* [Design](./docs/design.md)
* [Plugin writing example](./docs/plugin)__API__
* [Player](./docs/api/player.md)
* [Events](./docs/api/events.md)
* [DOM](./docs/api/dom.md)## Change Log
[CHANGELOG](./CHANGELOG.md)## License
larkplayer is [MIT licensed](./LICENSE)