「Widget:YouTube」の版間の差分

提供:エケペディア
ナビゲーションに移動 検索に移動
(Elastic Videos)
(add lazy、jsapi)
 
(2人の利用者による、間の2版が非表示)
1行目: 1行目:
<noinclude>
<noinclude>
This widget allows you to add a [https://developers.google.com/youtube/player_parameters YouTube video player] to your wiki page.
このウィジェットは、YouTubeの動画を埋め込みます。


== Using this widget ==
== 使い方 ==
For information on how to use this widget, see the [http://www.mediawikiwidgets.org/YouTube widget description page on MediaWikiWidgets.org].
<pre>{{#widget:YouTube|id=<watch?v=以降のURL>}}</pre>


</noinclude><includeonly><div class="video-container">
== 使用例 ==
<iframe width="<!--{$width|escape:'html'|default:'425'}-->" height="<!--{$height|escape:'html'|default:355}-->" src="//www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe></div></includeonly>
https://www.youtube.com/watch?v=_0vRVFudOg4 を埋め込む場合、
<pre>{{#widget:YouTube|id=_0vRVFudOg4}}</pre>
と記述すると、このように表示されます。
{{#widget:YouTube|id=_0vRVFudOg4}}
 
</noinclude><includeonly><div class="video-container"><iframe src="//www.youtube.com/embed/<!--{if isset($playlist)}-->?enablejsapi=1&listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'}-->?enablejsapi=1<!--{/if}-->" frameborder="0" allowfullscreen loading=lazy></iframe></div></includeonly>

2022年4月15日 (金) 19:32時点における最新版

このウィジェットは、YouTubeの動画を埋め込みます。

使い方

{{#widget:YouTube|id=<watch?v=以降のURL>}}

使用例

https://www.youtube.com/watch?v=_0vRVFudOg4 を埋め込む場合、

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

と記述すると、このように表示されます。