Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wangzmgit/vue-wplayer
Vue3弹幕播放器,开发交流群:909847398
https://github.com/wangzmgit/vue-wplayer
player video vue
Last synced: 3 months ago
JSON representation
Vue3弹幕播放器,开发交流群:909847398
- Host: GitHub
- URL: https://github.com/wangzmgit/vue-wplayer
- Owner: wangzmgit
- License: mit
- Created: 2022-09-21T14:28:09.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-14T08:08:36.000Z (about 1 year ago)
- Last Synced: 2024-07-16T22:14:23.162Z (4 months ago)
- Topics: player, video, vue
- Language: Vue
- Homepage: https://wplayer.interastral-peace.com/
- Size: 567 KB
- Stars: 21
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-wplayer 弹幕视频播放器
![NPM](https://img.shields.io/npm/l/vue-wplayer)
![npm](https://img.shields.io/npm/v/vue-wplayer?logo=npm)## 文档
示例: http://wplayer.kuukaa.fun/examples文档: http://wplayer.kuukaa.fun/guide/quick_start.html
## 安装
```
npm install vue-wplayer
```## 示例
```js
import { WPlayer } from 'vue-wplayer';
const options = {
resource: "视频链接",
}.container {
width: 720px;
}.player-container {
height: 0;
width: 100%;
padding-bottom: 56.25%;
position: relative;}
.player {
width: 100%;
height: 100%;
position: absolute;
background-color: black;
}```
## 参数
|内容|类型|描述|默认值|
|:-----|:-----|:-----|:-----|
|resource|string 或 不同清晰度信息对象|视频资源|-|
|type|string|视频类型|'mp4'|
|blob|bool|mp4是否开启blob|false|
|mobile|bool|是否为移动端|false|
|theme|string|主题色|'#4b5cc4'|
|playbackSpeed|[]| 播放速度|[0.5, 0.75, 1, 1.5, 2]|
|danmaku.open|bool|是否开启弹幕|false|
|danmaku.placeholder|string|弹幕输入提示|'在这里输入弹幕哦~'|
|danmaku.data|[]|弹幕数据|-|
|danmaku.send|function|发送弹幕回调函数|-|