Difference between revisions of "Template:BilibiliVideo/doc/parameter"

From Moegirlpedia
Jump to: navigation, search
(Created page with "; 必须参数 : '''id''' 视频的av/bv号({{color|red|必需参数}})('''不建议省略开头的av或bv''') :* 如果id为【av+一到九位纯数字】或【一到...")
 
m (// Edit via Wikiplus)
 
Line 1: Line 1:
; 必须参数
+
; Necessary parameter
: '''id''' 视频的av/bv号({{color|red|必需参数}})('''不建议省略开头的av或bv'''
+
: '''id''' the avid/bvid of the video ({{color|red|necessary parameter}}) ('''It is not recommended to omit the beginning av or bv''')
:* 如果id为【av+一到九位纯数字】或【一到九位纯数字】则按av号处理;
+
:* if the id is 【av + one to nine pure digits】 or 【one to nine pure digits】 then it is treated as avid.
:* 如果id为【bv+十位数字或字母】或【十位数字或字母】则按bv号处理;
+
:* If the id is 【bv + ten digits or letters】 or 【ten digits or letters】 then it is treated as bvid.
:* 如果以上两项id均不符合则报错。
+
:* Error is reported if neither of the above is matched.
; 可选参数
+
; Optional parameters
:#视频标题类
+
:# video title
:#*'''title''' 视频标题,可选,如果没有此参数或参数为空,会自动获取视频标题
+
:#*'''title''' video title, optional, it will automatically get the video title by default
:#分页类
+
:# video pages
:#*'''page''' 如果视频有分页,可以通过这个参数指定页数,可选,默认为1
+
:#*'''page'''' If the video has pagination, you can specify the number of pages by this parameter, optional, defaults to 1
:#*'''pagename''' 如果视频有分页,可以通过这个参数指定分页标题来确定页数,可选,默认为空
+
:#*'''pagename'''' If the video has pagination, you can specify the number of pages by this parameter, optional, defaults to empty
:#*'''subtitle''' 如果视频有分页,可以通过这个参数为true指定分页标题被显示出来,可选,默认为false
+
:#*'''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
:#自动播放类
+
:#Autoplay
:#*'''t''' 设置视频开始播放的位置,以秒为单位(如 01:40 记为(1×60+40=)100,但由于视频文件结构原因可能不能在准确的设定时间开始)(设置此参数后浏览者点击【显示视频】后视频会自动播放,但请注意高版本Chrome下可能无法自动播放视频,只能自动播放弹幕=。=
+
:#*'''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''' <code>true</code>时设置视频自动展开(只有未设置参数 <code>t</code> 的视频会被自动展开)
+
:#*'''autoexpand''' as <code>true</code>, the video will be auto expanded if it’s without the parameter <code>t</code>
:#长宽类
+
:#Sizes
:#*'''width''' 视频宽度,可选,默认为665px
+
:#*'''width'''' video width, optional, defaults to 665px
:#*'''height''' 视频高度,可选,默认为441px
+
:#*'''height'''' video height, optional, defaults to 441px
:#*'''max-width''' 视频最大宽度,可选,默认为665px
+
:#*'''max-width'''' the maximum width of the video, optional, defaults to 665px
:#*'''max-height''' 视频最大高度,可选,默认为441px
+
:#*'''max-height''' the maximum height of the video, optional, defaults to 441px
::上述四个长度值只接受格式为【正数<sub>(正整数或正小数)</sub>,其单位为空<sub>(视为<code>px</code></sub><code>px</code><code>pc</code><code>pt</code><code>em</code><code>ex</code><code>ch</code><code>rem</code><code>vw</code><code>vh</code><code>vmin</code><code>vmax</code><code>cm</code><code>mm</code><code>Q</code><code>in</code><code>%</code>之一】的数值<noinclude>[[Category:模板说明文件]]</noinclude>
+
::The above four length values are only accepted in 【positive <sub>(positive integer or positive decimal)</sub>, unit being null <sub>(considered as <code>px</code>)</sub> or one of <code>px</code>, <code>pc</code>, <code>pt</code>, <code>em</code>, <code>ex</code>, <code>ch</code>, <code>rem</code>, <code>vw</code>, <code>vh</code>, <code>vmin</code>, <code>vmax</code>, <code>cm</code>, <code>mm</code>, <code>Q</code>, <code>in</code>, <code>%</code><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 09:06, 2 August 2021

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, %