#### vue3 version of [vue-core-video-player](https://github.com/core-player/vue-core-video-player)
npm install shiro-video-play#### vue3 version of vue-core-video-player


+ English Document
+ 中文文档
+ 日本語
- customize controls demo
- HLS plugin @cloudgeek/playcore-hls
- i18n: zh-CN | pt-BR | jp | en(default)
#### Npm
`` bash`
$ npm install shiro-video-player --save
#### Yarn
` bash`
$ yarn add shiro-video-player
// main.js
import Vue3VideoPlayer from 'shiro-video-player'
import 'shiro-video-player/dist/vue3-video-player.css'const app = createApp(App)
app.use(Vue3VideoPlayer, {
lang: 'zh-CN'
}).mount('#app')
`
` vue
// your component
`Support barrage / danmaku
` vue
:barrageConfig="{fontSize: 20, opacity: 90, position: 80, barrageList: barrages2}" :view-core="viewCore">
`Customize Controls
Use slot name 'cusControls' like this:
`vue
xmlns="http://www.w3.org/2000/svg"
width="41"
height="47"
viewBox="0 0 41 47"
>
d="M23.5,0,47,41H0Z"
transform="translate(41) rotate(90)"
fill="#fff"
/>
`
You can use custom components like PictureInPictureIf you want to use video player funtion, just pass props of view-core and you will get the instance of player.
If there are multiple videos you can control player with id that defined by yourself.
` vue
viewCore (id, player) {
console.log(id, player)
this.players[id] = player
}
`HLS
`
import HLSCore from '@cloudgeek/playcore-hls'
`` vue
`i18n
You can use the built-in languages: 'en', 'zh-CN', 'pt-BR', 'jp'
`vue
app.use(Vue3VideoPlayer, {
lang: 'zh-CN'
}).mount('#app')
`
Or defined by yourself
`vue
const myLang = {
dashboard: {
btn: {
play: '播放',
pause: 'Pause',
fullscreen: 'Tela inteira',
exitFullscreen: 'Sair da tela inteira',
mute: 'Mute',
unmute: 'Unmute',
back: 'Back',
pip: 'ピクチャインピクチャ',
},
settings: {
autoplay: 'Autoplay',
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')
``