How To Embed a YouTube Video: Difference between revisions
From Drunkapedia
imported>Tlosk (added optional width parameter) |
imported>Tlosk No edit summary |
||
Line 1: | Line 1: | ||
You can embed a YouTube video using the video ID (the series of numbers/letters that are at the end of the page link following '''<code>v=</code>''' ). The default size is 425 pixels wide, however you can optionally specify a width between 100 and 1024. The height automatically stays a fixed ratio of the width. | You can embed a YouTube video using the video ID (the series of numbers/letters that are at the end of the page link following '''<code>v=</code>''' ). The default size is 425 pixels wide, however you can optionally specify a width between 100 and 1024. The height automatically stays a fixed ratio of the width. Adding <nowiki>[[Category:Video]]</nowiki> at least once on any page with a video will allow easier searching. | ||
== Code == | == Code == | ||
<pre> | <pre> | ||
<youtube v="VideoID" /> | <youtube v="VideoID" /> | ||
[[Category:Video]] | |||
</pre> | </pre> | ||
<pre> | <pre> | ||
<youtube v="VideoID" width="300" /> | <youtube v="VideoID" width="300" /> | ||
[[Category:Video]] | |||
</pre> | </pre> | ||
Revision as of 12:04, 10 May 2009
You can embed a YouTube video using the video ID (the series of numbers/letters that are at the end of the page link following v=
). The default size is 425 pixels wide, however you can optionally specify a width between 100 and 1024. The height automatically stays a fixed ratio of the width. Adding [[Category:Video]] at least once on any page with a video will allow easier searching.
Code
<youtube v="VideoID" /> [[Category:Video]]
<youtube v="VideoID" width="300" /> [[Category:Video]]
Example
For example:
<youtube v="uiC_XPpnn4k" />
displays as:
<youtube v="uiC_XPpnn4k" />