mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
Add documentation about youtubeLite params variable
This commit is contained in:
parent
b90b916493
commit
e36c227ce1
1 changed files with 27 additions and 5 deletions
|
@ -738,17 +738,39 @@ consectetur adipiscing elit.
|
||||||
A shortcut to embed youtube videos using the [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) library. This library is a lightweight alternative to the standard youtube embeds, and it's designed to be faster and more efficient.
|
A shortcut to embed youtube videos using the [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) library. This library is a lightweight alternative to the standard youtube embeds, and it's designed to be faster and more efficient.
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
| --------- | ----------------------------------- |
|
| --------- | -------------------------------------------- |
|
||||||
| `id` | [String] Youtube video id to embed. |
|
| `id` | [String] Youtube video id to embed. |
|
||||||
| `label` | [String] Label for the video |
|
| `label` | [String] Label for the video |
|
||||||
|
| `params` | [String] Extras parameters for video playing |
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
**Example 1:**
|
**Example 1:**
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}
|
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
|
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
|
||||||
|
|
||||||
|
**Example 2:**
|
||||||
|
|
||||||
|
You can use all of Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) for the `params` variable, as demonstrated below:
|
||||||
|
|
||||||
|
> This video will start after 130 seconds (2m10)
|
||||||
|
|
||||||
|
```md
|
||||||
|
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130" */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
> This video will not have UI controls, will start playing at 130 seconds and will stop 10 seconds later.
|
||||||
|
|
||||||
|
To concatenate multiple options as shown below, you need to add the `&` character between them.
|
||||||
|
|
||||||
|
```md
|
||||||
|
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
|
||||||
|
|
||||||
|
More informations can be found on the [youtubeLite GitHub repo](https://github.com/paulirish/lite-youtube-embed/blob/master/readme.md#custom-player-parameters) and Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) page.
|
||||||
|
|
Loading…
Reference in a new issue