Difference between revisions of "Template:Bilibili"
m |
m (bvid -> aid) |
||
Line 1: | Line 1: | ||
− | <div class="youtubebox ratio-{{{ratio|16x9}}} widths-{{{width|512}}}" style="margin:0.75em 0em;"><div class="embedvideo autoResize">{{#if: {{{align|}}}|<div class="embedvideowrap bilibili-video" data- | + | <div class="youtubebox ratio-{{{ratio|16x9}}} widths-{{{width|512}}}" style="margin:0.75em 0em;"><div class="embedvideo autoResize">{{#if: {{{align|}}}|<div class="embedvideowrap bilibili-video" data-vaid="{{#expr:{{{1|}}}}}" data-vdanmaku="{{#expr:{{{danmaku|0}}}}}" data-vwidth="{{#expr:{{{width|640}}}}}" data-vheight="{{#expr:{{{height|360}}}}}" style="text-align: {{{align|}}}"></div>|<div class="embedvideowrap bilibili-video" data-vaid="{{#expr:{{{1|}}}}}" data-vdanmaku="{{#expr:{{{danmaku|0}}}}}" data-vwidth="{{#expr:{{{width|640}}}}}" data-vheight="{{#expr:{{{height|360}}}}}"></div>}}</div>{{#if:{{{2|<noinclude>yes</noinclude>}}}| <br /><div>{{hatnote|1={{{2|Caption here.}}}}}}}</div><noinclude> |
{{Doc begin}} | {{Doc begin}} | ||
This template will embed a Bilibili video inside an article. | This template will embed a Bilibili video inside an article. | ||
=== Usage === | === Usage === | ||
− | * <code><nowiki>{{bilibili|Bilibili | + | * <code><nowiki>{{bilibili|Bilibili aid}}</nowiki></code> produces: {{bilibili|710126347}} |
− | * <code><nowiki>{{bilibili|Bilibili | + | * <code><nowiki>{{bilibili|Bilibili aid|Caption here.|width=value|height=value|align=alignment}}</nowiki></code> produces: {{bilibili|21525619|Ready Up: Competitive Team Fortress 2 Documentary|width=512|height=320|align=center}} |
− | * <code><nowiki>{{bilibili|Bilibili | + | * <code><nowiki>{{bilibili|Bilibili aid|danmaku=1}}</nowiki></code> produces: {{bilibili|96157214|danmaku=1}} |
=== Parameters === | === Parameters === | ||
− | ; Bilibili | + | ; Bilibili aid (required): The Bilibili video id of the video to include. |
; {{code|Caption}}: Custom caption to include. | ; {{code|Caption}}: Custom caption to include. | ||
− | ; {{code|width}}: Width of the video, in pixels. Default is | + | ; {{code|width}}: Width of the video, in pixels. Default is 640. |
− | ; {{code|height}}: Height of the video, in pixels. Default is | + | ; {{code|height}}: Height of the video, in pixels. Default is 360. |
; {{code|align}}: Horizontal alignment of video. Default is left. | ; {{code|align}}: Horizontal alignment of video. Default is left. | ||
; {{code|danmaku}}: Bullet screen/danmaku subtitles. Default is 0 (disabled). | ; {{code|danmaku}}: Bullet screen/danmaku subtitles. Default is 0 (disabled). |
Revision as of 22:02, 19 March 2021
Caption here.
Documentation for Bilibili
This template will embed a Bilibili video inside an article.
Usage
{{bilibili|Bilibili aid}}
produces:{{bilibili|Bilibili aid|Caption here.|width=value|height=value|align=alignment}}
produces:Ready Up: Competitive Team Fortress 2 Documentary{{bilibili|Bilibili aid|danmaku=1}}
produces:
Parameters
- Bilibili aid (required)
- The Bilibili video id of the video to include.
Caption
- Custom caption to include.
width
- Width of the video, in pixels. Default is 640.
height
- Height of the video, in pixels. Default is 360.
align
- Horizontal alignment of video. Default is left.
danmaku
- Bullet screen/danmaku subtitles. Default is 0 (disabled).
See also
{{bilibili tn}}