Extended Shortcode - bilibili

Contents

The bilibili shortcode embeds a responsive video player for bilibili videos.

Usages

When the video only has one part, only the BV id of the video is required, e.g.:

1
https://www.bilibili.com/video/BV1Sx411T7QQ

Example bilibili input:

1
2
3
{{< bilibili BV1Sx411T7QQ >}}
Or
{{< bilibili id=BV1Sx411T7QQ >}}

The rendered output looks like this:

When the video has multiple parts, in addition to the BV id of the video, p is also required, whose default value is 1, e.g.:

1
https://www.bilibili.com/video/BV1TJ411C7An?p=3

Example bilibili input with p:

1
2
3
{{< bilibili BV1TJ411C7An 3 >}}
Or
{{< bilibili id=BV1TJ411C7An p=3 >}}

The rendered output looks like this:

Options

The bilibili shortcode has the following named parameters:

  • id [required] (first positional parameter)

    The BV id of the video.

  • p [optional] (second positional parameter)

    Number of episodes of multi-P videos. Counting starts from 1, default value is 1.

  • autoplay [optional]

    Whether to autoplay, default value is false.

  • poster [optional]

    Whether to show the poster, default value is true.

  • muted [optional]

    Whether to mute, default value is false.

  • danmaku [optional]

    Whether to enable danmaku, default value is true.

  • t [optional]

    Jump to the initial time point of the media, default value is 0, unit: second.

0%