Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/hilongjw/vue-video

A HTML5 video player component for Vue.js
https://github.com/hilongjw/vue-video

video-player vue vue-video

Last synced: 7 days ago
JSON representation

A HTML5 video player component for Vue.js

Awesome Lists containing this project

README

        

# vue-video

> A HTML5 video player component for Vue.js

## Demo

live demo is here: [https://hilongjw.github.io/vue-video/](https://hilongjw.github.io/vue-video/)

![](https://raw.githubusercontent.com/hilongjw/vue-video/master/preview.png)
![](https://raw.githubusercontent.com/hilongjw/vue-video/master/preview2.png)

## Installation
```bash

npm i vue-video --save

```

## Usage

```
// script
import myVideo from 'vue-video'
export default {
data () {
return {
video: {
sources: [{
src: 'http://covteam.u.qiniudn.com/oceans.mp4',
type: 'video/mp4'
}],
options: {
autoplay: true,
volume: 0.6,
poster: 'http://covteam.u.qiniudn.com/poster.png'
}
}
}
},
components: {
myVideo
}
}
```

```html





```

## API

> sources

```
sources: [{
// video uri
src: 'http://covteam.u.qiniudn.com/oceans.mp4',
// video meta type
type: 'video/mp4'
}]

```

> options

```
options: {
// autoplay
autoplay: true,
// default volume
volume: 0.6,
// poster (cover image)
poster: 'http://covteam.u.qiniudn.com/poster.png'
}
```