Difference between revisions of "Template:BilibiliVideo/doc"

From Moegirlpedia
Jump to: navigation, search
m (// Edit via Wikiplus)
Line 1: Line 1:
 
{{BilibiliVideo/doc/copyright}}
 
{{BilibiliVideo/doc/copyright}}
 
{| style="width: 100%;"
 
{| style="width: 100%;"
| class="mw-label" | 使用语法:
+
| class="mw-label" | Usage:
 
| class="mw-input" | <code><nowiki>{{BilibiliVideo|id=</nowiki>'''BV'''177411m75s<nowiki>}}</nowiki></code><br>
 
| class="mw-input" | <code><nowiki>{{BilibiliVideo|id=</nowiki>'''BV'''177411m75s<nowiki>}}</nowiki></code><br>
 
<code><nowiki>{{BilibiliVideo|title=视频|id=6988716|pagename=2016WCS世界总决赛 决赛 ByuN VS Dark-1|width=47.5em|height=31.5em|max-width=47.5em|max-height=31.5em|subtitle=true|t=100}}</nowiki></code>
 
<code><nowiki>{{BilibiliVideo|title=视频|id=6988716|pagename=2016WCS世界总决赛 决赛 ByuN VS Dark-1|width=47.5em|height=31.5em|max-width=47.5em|max-height=31.5em|subtitle=true|t=100}}</nowiki></code>
 
|-
 
|-
| class="mw-label" | demo:
+
| class="mw-label" | Example:
 
| class="mw-input" | {{BilibiliVideo|id=BV177411m75s}}
 
| class="mw-input" | {{BilibiliVideo|id=BV177411m75s}}
 
{{BilibiliVideo|title=视频|id=6988716|pagename=2016WCS世界总决赛 决赛 ByuN VS Dark-1|width=47.5em|height=31.5em|max-width=47.5em|max-height=31.5em|subtitle=true|t=100}}
 
{{BilibiliVideo|title=视频|id=6988716|pagename=2016WCS世界总决赛 决赛 ByuN VS Dark-1|width=47.5em|height=31.5em|max-width=47.5em|max-height=31.5em|subtitle=true|t=100}}
 
|}
 
|}
== 参数解释 ==
+
== Parameters ==
 
{{BilibiliVideo/doc/parameter}}
 
{{BilibiliVideo/doc/parameter}}
==其他==
+
==Others==
:由于视频信息是直接向Bilibili获取的,请不要再同一页面添加过多本模板。否则如果用户没有在Bilibili登录账号的话,将会因速率限制导致后面的模板无法获取信息;
+
:Please do not add too many to a same page as the video information is obtained directly from bilibili. Otherwise, if the user doesn’t login bilibili, the information will not be available for the latter templates due to speed limitation.
:为简便编辑,您也可以使用{{tl|bv}}模板。
+
:To simplify, you can also use the {{tl|bv}} template.
<includeonly>[[Category:视频维护模板]]</includeonly><noinclude>[[分类:模板说明文件]]</noinclude>
+
<includeonly>[[Category:Video template]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 08:55, 2 August 2021

Name Bilibili Video Widget
Author 加大号的猫
Revisor Boxsnake
Re-revisor AnnAngela
Re-revisor for html5
Re-re-revisor for new html5
Mobile support XYZ指示物
Copyright Agreement MIT
Release Date

June 29, 2012, first version released.
February 6, 2015, updated.
November 29, 2016, updated with more details.
April 10, 2017 update to html5 version (many thanks for debugging_(:зゝ∠)_).
January 27, 2020, updated to the new html5 player.

Release URL https://zh.moegirl.org.cn/Widget:BilibiliVideo && https://zh.moegirl.org.cn/Template:BilibiliVideo
Notes. If you have any questions, please contact the author.
Usage: {{BilibiliVideo|id=BV177411m75s}}

{{BilibiliVideo|title=视频|id=6988716|pagename=2016WCS世界总决赛 决赛 ByuN VS Dark-1|width=47.5em|height=31.5em|max-width=47.5em|max-height=31.5em|subtitle=true|t=100}}

Example:
Wide ModeShow
Wide ModeShow

Parameters

Necessary parameter
id the avid/bvid of the video (necessary parameter) (It is not recommended to omit the beginning av or bv)
  • if the id is 【av + one to nine pure digits】 or 【one to nine pure digits】 then it is treated as avid.
  • If the id is 【bv + ten digits or letters】 or 【ten digits or letters】 then it is treated as bvid.
  • Error is reported if neither of the above is matched.
Optional parameters
  1. video title
    • title video title, optional, it will automatically get the video title by default
  2. video pages
    • page' If the video has pagination, you can specify the number of pages by this parameter, optional, defaults to 1
    • pagename' If the video has pagination, you can specify the number of pages by this parameter, optional, defaults to empty
    • subtitle' If the video has pagination, you can specify the pagination title to be displayed by setting this parameter as true, optional, defaults to false
  3. Autoplay
    • t Set the timing where the video starts to play in seconds (e.g. 01:40 is recorded as (1×60+40=)100, but it may not start at the exact set time due to the video file structure) (after setting this parameter the video will automatically play after the viewer clicks [show video], but please note that it may not automatically play the video under high version Chrome but only automatically play comments =。=)
    • autoexpand as true, the video will be auto expanded if it’s without the parameter t
  4. Sizes
    • width' video width, optional, defaults to 665px
    • height' video height, optional, defaults to 441px
    • max-width' the maximum width of the video, optional, defaults to 665px
    • max-height the maximum height of the video, optional, defaults to 441px
The above four length values are only accepted in 【positive (positive integer or positive decimal), unit being null (considered as px) or one of px, pc, pt, em, ex, ch, rem, vw, vh, vmin, vmax, cm, mm, Q, in, %

Others

Please do not add too many to a same page as the video information is obtained directly from bilibili. Otherwise, if the user doesn’t login bilibili, the information will not be available for the latter templates due to speed limitation.
To simplify, you can also use the {{bv}} template.