Difference between revisions of "Widget:YouTube"

From Industrial-Craft-Wiki
Jump to navigation Jump to search
(Created the YouTube Widget.)
 
(Alright...added back what I deleted.)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>__NOTOC__
This widget allows you to add a [https://developers.google.com/youtube/player_parameters YouTube video player] to your wiki page.
This widget allows you to add an awesome [http://www.youtube.com/ YouTube] video player to your wiki page.


== Using this widget ==
It was created by [[User:Yaron Koren|Yaron Koren]].
For information on how to use this widget, please see the [http://www.mediawikiwidgets.org/YouTube widget description page on MediaWikiWidgets.org].
 
</noinclude><includeonly><iframe width="<!--{$width|escape:'html'|default:'425'}-->" height="<!--{$height|escape:'html'|default:355}-->" src="https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe></includeonly>
To insert this widget, use the following code:
 
  <nowiki>{{#widget:YouTube|id=DWef69ItVrU}}</nowiki>
 
== Parameters ==
* '''id''' - video id (from the URL)
* '''playlist''' - playlist name (starts with PL) - first clip is played ('''id''' is ignored)
* '''height''' and '''width''' define view dimensions, 420x350 is default
 
== Sample result ==
=== Single Clip ===
{{#widget:YouTube|id=Ukytqe9pwDM}}
 
=== Playlist ===
{{#widget:YouTube|playlist=PL6FD8256CD24CFF1F}}
 
</noinclude>
<includeonly><iframe width="<!--{$width|escape:'html'|default:'425'}-->" height="<!--{$height|escape:'html'|default:355}-->" src="https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe></includeonly>

Latest revision as of 19:56, 22 February 2015

This widget allows you to add an awesome YouTube video player to your wiki page.

It was created by Yaron Koren.

To insert this widget, use the following code:

 {{#widget:YouTube|id=DWef69ItVrU}}

Parameters[edit]

  • id - video id (from the URL)
  • playlist - playlist name (starts with PL) - first clip is played (id is ignored)
  • height and width define view dimensions, 420x350 is default

Sample result[edit]

Single Clip[edit]

Playlist[edit]