Wraps <youtube> so that only the width need be given, the height following from the aspect ratio. Version 2.3.
| Parameter | Meaning |
|---|---|
1 |
video id, or a full YouTube URL |
size (or width, or 2) |
width in pixels; without it the video spans the full content width |
t (or start, or 3) |
where to start playing: 90, 635s, 1:30, 1:02:03, 1h2m3s
|
format |
aspect ratio: 16:9 (default), 4:3, 1:1, 9:16, 21:9
|
ui |
anything non-empty shrinks YouTube's own buttons along with the picture, see below |
Y |
on its own, as an unnamed parameter: the shorthand for size=200 with ui=small
|
{{Yt|b19_nb2kyYw|t=635s|size=200}} at 10:35, small
{{Yt|b19_nb2kyYw|Y|t=635s}} the same thing, said shortly
{{Yt|gTmQonvQpf8}} full width, 16:9
{{Yt|gTmQonvQpf8|400}} width as the second unnamed parameter
{{Yt|gTmQonvQpf8|400|1:30}} start as the third
{{Yt|gTmQonvQpf8|300|format=1:1}} square, for a Short
ui=smallYouTube draws its controls at a fixed size, so at size=200 the play button, the CC and settings buttons and the channel avatar eat most of the frame. ui=small renders the player at 560px, where those buttons are proportionate, and then scales the whole thing down to the width asked for, buttons and all:
{{Yt|b19_nb2kyYw|size=200|t=635s|ui=small}}
It only applies below 560px; above that there is nothing to shrink and the parameter is ignored.
Y shorthandA small embed is nearly always wanted the same way — 200px, and the buttons scaled to match — so that pair has a one-letter name. Y as an unnamed parameter is exactly size=200 together with ui=small:
{{Yt|b19_nb2kyYw|Y}} 200px, small buttons
{{Yt|b19_nb2kyYw|Y|t=635s}} the same, from 10:35
{{Yt|b19_nb2kyYw|Y|1:30}} a positional start still works after it
{{Yt|b19_nb2kyYw|Y|size=300}} Y for the buttons, 300px for the width
It may sit in any of the unnamed slots and is taken out of the way before the others are read, so the width and the start time are still counted as though it were not there. An explicit size= wins over its 200px, which is what the last line above is for. Lowercase y does the same.
1=An unnamed parameter containing an = is read by the parser as a named one, so {{Yt|https://youtu.be/ID?t=83}} silently loses the video. Either give the bare id, which is what size= and t= are for, or write
{{Yt|1=https://youtu.be/gTmQonvQpf8?t=83|size=400}}
and the t= the Copy link at current time menu gives you is picked up on its own. The bare <youtube> tag takes URLs without this precaution, since it is not a template.