Difference between revisions of "Template:BilibiliVideo/doc/parameter"
(Created page with "; 必须参数 : '''id''' 视频的av/bv号({{color|red|必需参数}})('''不建议省略开头的av或bv''') :* 如果id为【av+一到九位纯数字】或【一到...") |
m (// Edit via Wikiplus) |
||
Line 1: | Line 1: | ||
− | ; | + | ; Necessary parameter |
− | : '''id''' | + | : '''id''' the avid/bvid of the video ({{color|red|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 |
− | :# | + | :# video title |
− | :#*'''title''' | + | :#*'''title''' video title, optional, it will automatically get the video title by default |
− | :# | + | :# video pages |
− | :#*'''page''' | + | :#*'''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''' | + | :#*'''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''' | + | :#*'''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''' | + | :#*'''autoexpand''' as <code>true</code>, the video will be auto expanded if it’s without the parameter <code>t</code> |
− | :# | + | :#Sizes |
− | :#*'''width''' | + | :#*'''width'''' video width, optional, defaults to 665px |
− | :#*'''height''' | + | :#*'''height'''' video height, optional, defaults to 441px |
− | :#*'''max-width''' | + | :#*'''max-width'''' the maximum width of the video, optional, defaults to 665px |
− | :#*'''max-height''' | + | :#*'''max-height''' the maximum height of the video, optional, defaults to 441px |
− | :: | + | ::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
-
- video title
- title video title, optional, it will automatically get the video title by default
- 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
- 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 parametert
- 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 ofpx
,pc
,pt
,em
,ex
,ch
,rem
,vw
,vh
,vmin
,vmax
,cm
,mm
,Q
,in
,%
】
- video title