Template:YouTube video/doc: Difference between revisions
Jump to navigation
Jump to search
doc |
No edit summary |
||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
<code><nowiki>{{YouTube video|dQw4w9WgXcQ| | <code><nowiki>{{YouTube video|dQw4w9WgXcQ|420}}</nowiki></code> outputs: | ||
{{YouTube video|dQw4w9WgXcQ| | {{YouTube video|dQw4w9WgXcQ|420}} | ||
== Template data == | == Template data == | ||
Line 29: | Line 29: | ||
"2": { | "2": { | ||
"label": "Dimensions", | "label": "Dimensions", | ||
"description": "What dimensions to make the embedded video.", | "description": "What dimensions in pixels to make the embedded video. To specify only the width, just type the number. To specify the height, add an x before the number.", | ||
"example": "480x320", | "example": "480x320", | ||
"default": " | "default": "480", | ||
"suggested": true | "suggested": true, | ||
"type": "string" | |||
}, | }, | ||
"3": { | "3": { |
Latest revision as of 05:34, 23 August 2020
Embeds a YouTube video.
Usage[edit source]
Basic usage: {{YouTube video|Video ID}}
All parameters: {{YouTube video|Video ID|dimensions|alignment}}
Parameter details:
Video ID
- The ID of the YouTube video, which is the part that comes after "watch?v=" in the URL. Can also be the full URL. Example:dQw4w9WgXcQ
dimensions
- The width and/or height in pixels of the video embed. Width can just be a number, height must have an "x" before the number. Examples:480
to specify a width of 480.x320
to specify a height of 320.480x320
to specify both a width of 480 and a height of 320.alignment
- Whether to align the video on the left, right, or center of the page.
Example[edit source]
{{YouTube video|dQw4w9WgXcQ|420}}
outputs:
Template data[edit source]
Embeds a YouTube video.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Video ID | 1 | The ID of the YouTube video, which is the part that comes after "watch?v=" in the URL. Can also be the full URL.
| String | required |
Dimensions | 2 | What dimensions in pixels to make the embedded video. To specify only the width, just type the number. To specify the height, add an x before the number.
| String | suggested |
Alignment | 3 | Whether to align the video in the left, right, or center of the page.
| String | suggested |