Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 22 hours ago
JSON representation

🚀 A lightweight & flexible web player :)

Awesome Lists containing this project

README

        

larkplayer


 NPM version
Downloads
License


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 dependencies

We 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)