Template:YouTube: Difference between revisions
implementing css fix |
imported>MirahezeGDPR 88da7cb7afcc9101e0b4087ac452ce79 No edit summary |
||
Line 25: | Line 25: | ||
Example markup: |
Example markup: |
||
<code><nowiki>{{YouTube|id= |
<code><nowiki>{{YouTube|id=oznr-1-poSU|description=this is the first video|id2=oznr-1-poSU|description2=this is the second video|id3=oznr-1-poSU|description3=this is the third video|id4=ScMzIvxBSi4|t=21s|description=this is a video with a timestamp (0:21)}}</nowiki></code> |
||
https://www.youtube.com/watch?v=oznr-1-poSU |
|||
Output (ignore the "Template Loop" message if it appears): |
Output (ignore the "Template Loop" message if it appears): |
||
{{YouTube|id=yuo0EWZMTBc|description=this is the first video|id2=yuo0EWZMTBc|description2=this is the second video|id3=yuo0EWZMTBc|description3=this is the third video|id4=NYkhWaUG5d4|t4=21|description4=this is a video with a timestamp (0:21)}} |
{{YouTube|id=yuo0EWZMTBc|description=this is the first video|id2=yuo0EWZMTBc|description2=this is the second video|id3=yuo0EWZMTBc|description3=this is the third video|id4=NYkhWaUG5d4|t4=21|description4=this is a video with a timestamp (0:21)}} |
Revision as of 19:49, 14 February 2023
A rewrite of the YouTube template which uses mw:Extension:EmbedVideo. The markup is unchanged by default, with the exception of the optional width
and height
parameters being replaced by a single dimensions
parameter. For this parameter, input must be expressed as (width) x (height)
. The new template also adds an optional description
parameter which allows us to caption embedded videos in the same manner as images and directly uploaded videos (finally!). A new t
parameter allows you to start the video at a certain timestamp, which didn't work properly with the old YouTube extension. Given EmbedVideo's broader capabilities, versions of this template can be created for Vimeo, Dailymotion, Archive.org and more.
Example markup:
{{YouTube|id=oznr-1-poSU|description=this is the first video|id2=oznr-1-poSU|description2=this is the second video|id3=oznr-1-poSU|description3=this is the third video|id4=ScMzIvxBSi4|t=21s|description=this is a video with a timestamp (0:21)}}
https://www.youtube.com/watch?v=oznr-1-poSU Output (ignore the "Template Loop" message if it appears):