u2sb u2sb
Home
  • 弹幕服务器 (opens new window)
  • MetingJS.Server
  • vuepress-plugin-smplayer
  • vuepress-plugin-vssue-global (opens new window)
  • hexo-tag-mmedia
  • 通用弹幕服务器
  • OBS导播键盘
GitHub (opens new window)
Home
  • 弹幕服务器 (opens new window)
  • MetingJS.Server
  • vuepress-plugin-smplayer
  • vuepress-plugin-vssue-global (opens new window)
  • hexo-tag-mmedia
  • 通用弹幕服务器
  • OBS导播键盘
GitHub (opens new window)
  • Overview

  • MetingJsServer

  • vuepress-plugin-smplayer

    • 安装和基本介绍
    • Meting
    • Aplayer
    • Dplayer
    • ArtPlayer
    • 哔哩哔哩动画
      • 介绍
      • 使用
      • 参数
      • 配置
      • 高清
    • 西瓜视频
    • Xgplayer
    • FAQ
  • hexo-tag-mmedia

  • Danmu.Server

  • OpenSw
  • vuepress-plugin-smplayer
MonologueChi
2022-01-24
目录

哔哩哔哩动画

# 介绍

可以插入 bilibili 视频

# 使用

<Bilibili bvid="BV1zt411t79A" />
1

# 参数

以下为默认参数,默认参数可省略

<Bilibili
  bvid="BV1zt411t79A"
  :page="1"
  :danmaku="true"
  :sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
  :allowfullscreen="allowfullscreen"
  width="100%"
  :height="[9 / 16, 70]"
/>
1
2
3
4
5
6
7
8
9

height 为播放器高度,对应 css 高度计算为: width * height[0] + height[1]

# 配置

主题下插件配置为默认配置,每个 <Bilibili /> 标签下的设置会覆盖默认配置。

module.exports = {
  plugins: [
    [
      "smplayer",
      {
        bilibili: {
          page: 1,
          danmaku: !0,
          allowfullscreen: "allowfullscreen",
          sandbox:
            "allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups",
          width: "100%",
          height: [9 / 16, 70],
        },
      },
    ],
  ],
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

或

module.exports = {
  plugins: {
    smplayer: {
      bilibili: {
        page: 1,
        danmaku: !0,
        allowfullscreen: "allowfullscreen",
        sandbox:
          "allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups",
        width: "100%",
        height: [9 / 16, 70],
      },
    },
  },
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# 高清

如需嵌入高清视频,可使用第三方视频解析,例如 https://busiyi.notion.site/B-1080P-Notion-88315db1b76f4e72a610e4e692cd8f96

<ClientOnly>
  <DPlayer :src="dplayerDan" />
</ClientOnly>

<script>
  export default {
    data() {
      return {
        dplayerDan: {
          video: {
            url: "https://video-direct-link.vercel.app/bili.mp4?aid=810872&bvid=BV1Js411o76u&cid=1176840",
          },
          danmaku: {
            addition: [
              "https://danmu.u2sb.com/api/dplayer/v3/bilibili/av810872",
            ],
          },
        },
      };
    },
  };
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#开源项目#vuepress-plugin-smplayer
上次更新: 10/4/2022, 11:21:17 PM
ArtPlayer
西瓜视频

← ArtPlayer 西瓜视频→

Theme by Vdoing | Copyright © 2018-2022 MonoLogueChi | CC BY-NC-SA 4.0
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式