Widget:YouTube — различия между версиями

Материал из rock63.ru
Перейти к: навигация, поиск
Строка 13: Строка 13:
 
* '''playlist''' - playlist name (starts with PL) - first clip is played ('''id''' is ignored)
 
* '''playlist''' - playlist name (starts with PL) - first clip is played ('''id''' is ignored)
 
* '''width''' and '''height''' define view dimensions, 350x267 is default{{doc-end}}
 
* '''width''' and '''height''' define view dimensions, 350x267 is default{{doc-end}}
</noinclude><includeonly><iframe width="<!--{$width|validate:int|default:350}-->" height="<!--{$height|validate:int|default:267}-->" src="http://www.youtube.com/embed/<!--{$id|escape:'urlpathinfo'}-->" frameborder="0" allowfullscreen></iframe><!--{if isset($description)}--><br /><!--{$description}--> <div class="floatright"><a href="http://youtu.be/<!--{$id|escape:'urlpathinfo'}-->"><img src="//wiki.rock63.ru/images/6/6b/Magnify-clip.png" alt="Открыть в отдельном окне"></a></div><!--{/if}--></includeonly>
+
</noinclude><includeonly><iframe width="<!--{$width|validate:int|default:350}-->" height="<!--{$height|validate:int|default:267}-->" src="http://www.youtube.com/embed/<!--{$id|escape:'urlpathinfo'}-->" frameborder="0" allowfullscreen></iframe></includeonly>

Версия 13:40, 30 июля 2014

Виджет для вставки видео с YouTube на страницу. Автор виджета: Yaron Koren.

Использование

Одно видео

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

Плейлист

{{#widget:YouTube|playlist=PL6FD8256CD24CFF1F}}

Параметры

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