FHODSArchive (talk | contribs) Created page with "<includeonly>{{#ifeq:{{{thumb|yes}}}|no|<htmltag tagname="iframe" src="https://www.youtube.com/embed/{{{v}}}?autohide=1&modestbranding=1{{#ifeq:{{{autoplay|}}}|yes|&autoplay=1}}" width="{{{width|350}}}" height="{{#ifeq:{{{wide|no}}}|no|{{#expr:{{{width|350}}}*.75}}|{{#expr:{{{width|350}}}*.5625}}}}" frameborder="0" scrolling="no"></htmltag>| <div class="thumb tright"><div class="thumbinner" style="width: {{{width|300}}}px;" ><htmltag tagname="iframe" src="https://www.you..." |
FHODSArchive (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{{thumb|yes}}}|no|<htmltag tagname="iframe" src="https://www.youtube.com/embed/{{{v}}}?autohide=1&modestbranding=1{{#ifeq:{{{autoplay|}}}|yes|&autoplay=1}}" width="{{{width|350}}}" height="{{#ifeq:{{{wide|no}}}|no|{{#expr:{{{width|350}}}*.75}}|{{#expr:{{{width|350}}}*.5625}}}}" frameborder="0" scrolling="no"></htmltag>| | <includeonly>{{#ifeq:{{{thumb|yes}}}|no|<htmltag tagname="iframe" src="https://www.youtube.com/embed/{{{v}}}?autohide=1&modestbranding=1{{#ifeq:{{{autoplay|}}}|yes|&autoplay=1}}" width="{{{width|350}}}" height="{{#ifeq:{{{wide|no}}}|no|{{#expr:{{{width|350}}}*.75}}|{{#expr:{{{width|350}}}*.5625}}}}" frameborder="0" scrolling="no"></htmltag>| | ||
<div class="thumb tright"><div class="thumbinner" style="width: {{{width|300}}}px;" ><htmltag tagname="iframe" src="https://www.youtube.com/embed/{{{v|}}}?autohide=1&modestbranding=1&showinfo=0{{#ifeq:{{{autoplay|}}}|yes|&autoplay=1}}" width="{{{width|300}}}" height="{{#ifeq:{{{wide|no}}}|no|{{#expr:{{{width|300}}}*.75}}|{{#expr:{{{width|300}}}*.603}}}}" frameborder="0" scrolling="no"></htmltag><div class="thumbcaption"><div class="magnify" style="float: right;">[[File:YouTubeTransparentIcon.png|alt=YouTube|link=https://www.youtube.com/watch?v={{{v}}}]]</div>{{{1|Music video for "{{PAGENAME}}"}}}</div></div></div>}}</includeonly><noinclude>{{YouTube Thumb|v=cPkthnUdYro|" | <div class="thumb tright"><div class="thumbinner" style="width: {{{width|300}}}px;" ><htmltag tagname="iframe" src="https://www.youtube.com/embed/{{{v|}}}?autohide=1&modestbranding=1&showinfo=0{{#ifeq:{{{autoplay|}}}|yes|&autoplay=1}}" width="{{{width|300}}}" height="{{#ifeq:{{{wide|no}}}|no|{{#expr:{{{width|300}}}*.75}}|{{#expr:{{{width|300}}}*.603}}}}" frameborder="0" scrolling="no"></htmltag><div class="thumbcaption"><div class="magnify" style="float: right;">[[File:YouTubeTransparentIcon.png|alt=YouTube|link=https://www.youtube.com/watch?v={{{v}}}]]</div>{{{1|Music video for "{{PAGENAME}}"}}}</div></div></div>}}</includeonly><noinclude>{{YouTube Thumb|v=cPkthnUdYro|"Lie Still, Little Bottle" live on Record Guide, 1988}} | ||
This template can be used to embed playable YouTube videos to the right of a page, just like an image thumbnail. It can also be used to embed full-size YouTube videos on a page. | This template can be used to embed playable YouTube videos to the right of a page, just like an image thumbnail. It can also be used to embed full-size YouTube videos on a page. | ||
Latest revision as of 13:08, 11 June 2026
This template can be used to embed playable YouTube videos to the right of a page, just like an image thumbnail. It can also be used to embed full-size YouTube videos on a page.
Implementing
{{YouTube Thumb|v=video ID|description}}
Optional parameters
If the width is not specified, the default of 300 will be used (normal image thumbnail size). To change the width, add the parameter:
|width=number
If the video is in widescreen (16:9 aspect ratio), add:
|wide=yes
To make the video start right when the page loads, add:
|autoplay=yes
To make the YouTube video display as a normal-sized video on the page and not a right-aligned thumbnail, use:
|thumb=no
Note that non-thumbnail videos will not have a description, so including one for them is unnecessary. The default width for these videos is 350 but may also be changed using the |width= parameter.<templatedata>
{
"description": "This template can be used to embed videos from YouTube.",
"params": {
"1": {
"label": "Description",
"description": "A quick description of the video.",
"type": "string"
},
"thumb": {
"label": "Thumbnail",
"description": "Makes the YouTube video display as a normal-sized video on the page and not a right-aligned thumbnail, if set to \"yes\".",
"type": "string",
"default": "no"
},
"v": {
"label": "Video ID",
"description": "The video's id from YouTube. ",
"type": "string",
"required": true
},
"autoplay": {
"label": "Autoplay",
"description": "If set to \"yes\", the video will begin playing on page load.",
"type": "string",
"default": "no"
},
"width": {
"label": "Width",
"description": "If the width is not specified, the default of 300 will be used (normal image thumbnail size).",
"type": "string"
},
"wide": {
"label": "Widescreen",
"description": "Set to yes, if the video is in 16:9 aspect ratio.",
"type": "string"
}
}
}
</templatedata>
