Template:YouTube: Difference between revisions

From the Audiovisual Identity Database, the motion graphics museum

Content deleted Content added
No edit summary
expanding for 20 videos in preparation for full implementation
Line 1:
<includeonly><center><!--
-->{{#if:{{{id|}}}|{{#ev:youtube|{{{id}}}|dimensions={{{width|240}}}x{{{height|185}}|inline|<center>{{{description}}}</center>|urlArgs=start={{{t}}}}}}} <!--
-->{{#if:{{{id2|}}}|{{#ev:youtube|{{{id2}}}|dimensions={{{widthwidth2|240}}}x{{{heightheight2|185}}|inline|<center>{{{description2}}}</center>|urlArgs=start={{{t2}}}}}}} <!--
-->{{#if:{{{id3|}}}|{{#ev:youtube|{{{id3}}}|dimensions={{{widthwidth3|240}}}x{{{heightheight3|185}}|inline|<center>{{{description3}}}</center>|urlArgs=start={{{t3}}}}}}} <!--
-->{{#if:{{{id4|}}}|{{#ev:youtube|{{{id4}}}|dimensions={{{widthwidth4|240}}}x{{{heightheight4|185}}|inline|<center>{{{description4}}}</center>|urlArgs=start={{{t4}}}}}}} <!--
-->{{#if:{{{id5|}}}|{{#ev:youtube|{{{id5}}}|dimensions={{{widthwidth5|240}}}x{{{heightheight5|185}}|inline|<center>{{{description5}}}</center>|urlArgs=start={{{t5}}}}}}}<!--
-->{{#if:{{{id6|}}}|{{#ev:youtube|{{{id6}}}|dimensions={{{width5|240}}}x{{{height6|185}}|inline|<center>{{{description6}}}</center>|urlArgs=start={{{t6}}}}}}}<!--
-->{{#if:{{{id7|}}}|{{#ev:youtube|{{{id7}}}|dimensions={{{width7|240}}}x{{{height7|185}}|inline|<center>{{{description7}}}</center>|urlArgs=start={{{t7}}}}}}}<!--
-->{{#if:{{{id8|}}}|{{#ev:youtube|{{{id8}}}|dimensions={{{width8|240}}}x{{{height8|185}}|inline|<center>{{{description8}}}</center>|urlArgs=start={{{t8}}}}}}}<!--
-->{{#if:{{{id9|}}}|{{#ev:youtube|{{{id9}}}|dimensions={{{width9|240}}}x{{{height9|185}}|inline|<center>{{{description9}}}</center>|urlArgs=start={{{t9}}}}}}}<!--
-->{{#if:{{{id10|}}}|{{#ev:youtube|{{{id10}}}|dimensions={{{width10|240}}}x{{{height10|185}}|inline|<center>{{{description10}}}</center>|urlArgs=start={{{t10}}}}}}}<!--
-->{{#if:{{{id11|}}}|{{#ev:youtube|{{{id11}}}|dimensions={{{width11|240}}}x{{{height11|185}}|inline|<center>{{{description11}}}</center>|urlArgs=start={{{t11}}}}}}}<!--
-->{{#if:{{{id12|}}}|{{#ev:youtube|{{{id12}}}|dimensions={{{width12|240}}}x{{{height12|185}}|inline|<center>{{{description12}}}</center>|urlArgs=start={{{t12}}}}}}}<!--
-->{{#if:{{{id13|}}}|{{#ev:youtube|{{{id13}}}|dimensions={{{width13|240}}}x{{{height13|185}}|inline|<center>{{{description13}}}</center>|urlArgs=start={{{t13}}}}}}}<!--
-->{{#if:{{{id14|}}}|{{#ev:youtube|{{{id14}}}|dimensions={{{width14|240}}}x{{{height14|185}}|inline|<center>{{{description14}}}</center>|urlArgs=start={{{t14}}}}}}}<!--
-->{{#if:{{{id15|}}}|{{#ev:youtube|{{{id15}}}|dimensions={{{width15|240}}}x{{{height15|185}}|inline|<center>{{{description15}}}</center>|urlArgs=start={{{t15}}}}}}}<!--
-->{{#if:{{{id16|}}}|{{#ev:youtube|{{{id16}}}|dimensions={{{width16|240}}}x{{{height16|185}}|inline|<center>{{{description16}}}</center>|urlArgs=start={{{t16}}}}}}}<!--
-->{{#if:{{{id17|}}}|{{#ev:youtube|{{{id17}}}|dimensions={{{width17|240}}}x{{{height17|185}}|inline|<center>{{{description17}}}</center>|urlArgs=start={{{t17}}}}}}}<!--
-->{{#if:{{{id18|}}}|{{#ev:youtube|{{{id18}}}|dimensions={{{width18|240}}}x{{{height18|185}}|inline|<center>{{{description18}}}</center>|urlArgs=start={{{t18}}}}}}}<!--
-->{{#if:{{{id19|}}}|{{#ev:youtube|{{{id19}}}|dimensions={{{width19|240}}}x{{{height19|185}}|inline|<center>{{{description19}}}</center>|urlArgs=start={{{t19}}}}}}}<!--
-->{{#if:{{{id20|}}}|{{#ev:youtube|{{{id20}}}|dimensions={{{width20|240}}}x{{{height20|185}}|inline|<center>{{{description20}}}</center>|urlArgs=start={{{t20}}}}}}}<!--
</center></includeonly>
<noinclude>
A rewrite of the YouTube template which uses [[mw:Extension:EmbedVideo]]. This template has been created solely for testing purposes (at this stage) and is only capable of handling 5 videos currently. The markup is unchanged by default, with the exception of the optional <code>width</code> and <code>height</code> parameters being replaced by a single <code>dimensions</code> parameter. For this parameter, input must be expressed as <code>(width) x (height)</code>. The new template also adds an optional <code>description</code> parameter which allows us to caption embedded videos in the same manner as images and directly uploaded videos (finally!). A new <code>t</code> 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:

Revision as of 04:07, 29 September 2022


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: {{YouTube2|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|description=this is a video with a timestamp (0:21)}}

Output (ignore the "Template Loop" message if it appears):

this is the first video

this is the second video

this is the third video

this is a video with a timestamp (0:21)

Cookies help us deliver our services. By using our services, you agree to our use of cookies.