Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
LarchLiu committed Dec 1, 2021
1 parent 6aea946 commit 470b260
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

- HLS plugin [@cloudgeek/playcore-hls](https://github.com/LarchLiu/playcore-hls)

- i18n: zh-CN | pt-BR | jp | en(default)

- [example](https://github.com/LarchLiu/vue3-video-player/blob/master/src/App.vue)   [demo](https://cloudgeektech.com/vue3-video-player/)

## Get Started
Expand All @@ -27,7 +29,7 @@ $ npm install @cloudgeek/vue3-video-player --save
#### Yarn

``` bash
$ yarn add @cloudgeek/vue3-video-player --save
$ yarn add @cloudgeek/vue3-video-player
```

## Basic Use
Expand Down Expand Up @@ -92,7 +94,7 @@ If you want to use video player funtion, just pass props of view-core and you wi

If there are multiple videos you can control player with id that defined by yourself.

```codes
``` vue
viewCore (id, player) {
console.log(id, player)
this.players[id] = player
Expand All @@ -112,3 +114,51 @@ import HLSCore from '@cloudgeek/playcore-hls'
</vue3-video-player>
</div>
```

## i18n
You can use the built-in languages: 'en', 'zh-CN', 'pt-BR', 'jp'
```vue
app.use(Vue3VideoPlayer, {
lang: 'zh-CN'
}).mount('#app')
```
Or define by yourself
```vue
const myLang = {
"dashboard" : {
"btn": {
"play": "Play",
"pause": "Pause",
"fullscreen": "Full Screen",
"exitFullscreen": "Exit Full Screen",
"mute": "Mute",
"unmute": "Unmute",
"back": "Back",
"pip": "Picture-in-Picture"
},
"settings" : {
"autoplay": "Autoplay",
"loop": "Loop",
"speed": "Speed",
"resolution": "Resolution"
}
},
"layers": {
"error": {
"title": "Error!",
"2404": "Video Source Undefined",
"2502": "Media Network Error",
"2503": "Video Cannot DECODE",
"2504": "Video Cannot Play!",
"601": "Live video Cannot Play!"
},
"loading": {
"msg": "Loading ..."
}
}
}
app.use(Vue3VideoPlayer, {
lang: myLang
}).mount('#app')
```

0 comments on commit 470b260

Please sign in to comment.