Widget:YouTube: Difference between revisions
Jump to navigation
Jump to search
Created page with "<noinclude> This widget allows you to add YouTube video player to your wiki page. It was created by [http://www.mediawikiwidgets.org/User:Yaron_Koren Yaron Koren]. == Using thi..." |
Added usage instructions |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This widget allows you to | This widget allows you to embed a YouTube video player in a wiki page. | ||
== Usage == | |||
You can insert a video with the following wiki code: | |||
<nowiki>{{#widget:YouTube|id=DWef69ItVrU}}</nowiki> | |||
== | === Parameters === | ||
;id | |||
</noinclude><includeonly><object width="<!--{$width|escape:'html'|default:' | : The video ID. This can be found in the YouTube video's URL, for example: <code><nowiki>http://</nowiki>www.youtube.com/watch?v='''''DWef69ItVrU'''''</code> | ||
;width | |||
: Width of the video player in pixels (default 480). | |||
;height | |||
: Height of the video player in pixels (default 385). | |||
For 16:9 video you will get better results by setting the size to 640×385. | |||
== Example == | |||
{{#widget:YouTube|id=DWef69ItVrU}} | |||
</noinclude><includeonly><object width="<!--{$width|escape:'html'|default:'480'}-->" height="<!--{$height|escape:'html'|default:385}-->"><param name="movie" value="http://www.youtube.com/v/<!--{$id|escape:'urlpathinfo'}-->"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<!--{$id|escape:'urlpathinfo'}-->" type="application/x-shockwave-flash" wmode="transparent" width="<!--{$width|escape:'html'|default:'480'}-->" height="<!--{$height|escape:'html'|default:385}-->"></embed></object></includeonly> |
Revision as of 13:21, 9 March 2011
This widget allows you to embed a YouTube video player in a wiki page.
Usage
You can insert a video with the following wiki code:
{{#widget:YouTube|id=DWef69ItVrU}}
Parameters
- id
- The video ID. This can be found in the YouTube video's URL, for example:
http://www.youtube.com/watch?v=DWef69ItVrU
- width
- Width of the video player in pixels (default 480).
- height
- Height of the video player in pixels (default 385).
For 16:9 video you will get better results by setting the size to 640×385.
Example