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.
<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 BV17x411w7KC.
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-param="1" data-size="100%">[https://bilibili.com/av170001 Watch this video (゜-゜)つロ]</div>. Text will not display for oasis skin.
If you want to show this really cool music video from https://www.bilibili.com/video/BV1GJ411x7h7
<!-- Using BV number --> <div class="BilibiliVideo" data-bv="1GJ411x7h7" data-param="" data-size="80%"></div> <!-- AV also supported --> <div class="BilibiliVideo" data-av="80433022" data-param="" data-size="80%"></div>
See also template: