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

Материал из rock63.ru
Перейти к: навигация, поиск
Строка 15: Строка 15:
 
* '''height''' and '''width''' define view dimensions, 350x267 is default
 
* '''height''' and '''width''' define view dimensions, 350x267 is default
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<iframe width="<!--{$width|escape:'html'|default:'350'}-->" height="<!--{{{#expr: ($width/4)*3}}|escape:'html'|default:'{{#expr: (350/4)*3}}'}-->" src="http://www.youtube.com/embed/<!--{$id|escape:'urlpathinfo'}-->" frameborder="0" allowfullscreen></iframe></includeonly>
+
<iframe width="<!--{$width|escape:'html'|default:'350'}-->" height="<!--{($width/4)*3|escape:'html'|default:'{{#expr: (350/4)*3}}'}-->" src="http://www.youtube.com/embed/<!--{$id|escape:'urlpathinfo'}-->" frameborder="0" allowfullscreen></iframe></includeonly>

Версия 13:25, 19 декабря 2013

Виджет для вставки видео с 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)
  • height and width define view dimensions, 350x267 is default