1.2.1 • Published 2 years ago

vue-bilibili-embed-renderer v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-bilibili-embed-renderer

It is better to use Bilibili's embed renderer component for Vue applications.

Vue中更加方便地使用哔哩哔哩的嵌入代码。

Usage

  1. install deps
$ yarn install vue-bilibili-embed-renderer
  1. import component and css

You can use components alone or global register components.

// use alone in single vue component 单独使用
import BilibiliEmbedRenderer from 'vue-bilibili-embed-renderer'

// or global register component in `main.ts` 全局注册
import { createApp } from 'vue'
import App from './App.vue'
import BilibiliEmbedRenderer from 'vue-bilibili-embed-renderer'

const app = createApp(App)
app.component('BilibiliEmbedRenderer', BilibiliEmbedRenderer)
app.mount('#app')
  1. use component
<BilibiliEmbedRenderer aid="3787944" />

Parameters

字段是否必传默认值类型描述
aidtrueString视频的 aid(可以在嵌入代码找到找到对应 aid)
aspectWidthfalse416Number宽高比的宽值(PC 端设备为4,移动端设备为16)
aspectHeightfalse39Number宽高比的高值(PC 端设备为3,移动端设备为9)
widthfalse480NumberString视频窗口的宽度
heightfalse360NumberString视频窗口的高度(不传时会根据宽高比自动计算数值)
pagefalse1Number视频集合中第几个视频 (可以在嵌入代码找到对应 page)
isWidefalsetrueBoolean是否显示宽屏或者小屏
highQualityfalsetrueBoolean是否开启高清晰度(不开启默认最低清晰度)
hasDanmakufalsefalseBoolean是否开启弹幕
iframeClassfalseStringiframe 自定义 class
1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago