Fandom Developers Wiki
Advertisement

BilibiliVideo is a script that can let you add H5 VideoPlayer (video with danmaku) on the page for video from bilibili.com (What is bilibili?).

Note: This script cannot display Bilibili videos that require logging in, and will show a short error video instead. Such videos are generally restricted by copyright and are only allowed to be viewed in mainland China.

Installation

Usage

Code

<div class="BilibiliVideo" data-bv="BV Number" data-page="Page of video" data-size="Player width"></div>
data-av
Old video ID used by bilibili called AV number. General at the end of the URL. Such as av170001.
data-bv
BV number of video. General at the end of the URL. Such as BV1uT4y1P7CX.
data-page
Page of video. If the video has only one p, leave it blank. Only number.
data-size
Width of player. Height will be adjusted automatically.
  • ☆You'd better add some text include the div block for mobile users like: <div class="BiliVideo" data-av="170001" data-page="1" data-size="100%">[https://bilibili.com/av170001 Watch this video (゜-゜)つロ]</div>.

Example

If you want to show this really cool music video from https://www.bilibili.com/video/BV1uT4y1P7CX:

<!-- Using BV number -->
<div class="BilibiliVideo" data-bv="BV1uT4y1P7CX" data-page="" data-size="80%"></div>
<!-- AV also supported -->
<div class="BilibiliVideo" data-av="av170001" data-page="" data-size="80%"></div>

See also template:

Text above can be found here (edit)
Advertisement