この文書の現在のバージョンと選択したバージョンの差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
wiki:youtube [2016/12/26 ] N_Miya |
wiki:youtube [2017/01/11 ] (現在) N_Miya |
||
---|---|---|---|
ライン 1: | ライン 1: | ||
====YouTube Video==== | ====YouTube Video==== | ||
- | <code>{{ youtube>v=0E00Zuayv9Q?small |Some funny video}}</code> | + | <code>{{ youtube>0E00Zuayv9Q?small |ペン・パイナップルペン}}</code> |
上記のように書けば、下記の表示がされる。 | 上記のように書けば、下記の表示がされる。 | ||
- | {{ youtube>v=0E00Zuayv9Q?small |PICO}} | + | {{ youtube>0E00Zuayv9Q?small |ペン・パイナップルペン}} |
+ | |||
+ | ====htmlで埋め込む方法==== | ||
+ | <code> | ||
+ | <html> | ||
+ | <div class=”video”> | ||
+ | <iframe src="https://www.youtube.com/embed/lJIrF4YjHfQ" frameborder="0" allowfullscreen> | ||
+ | </div> | ||
+ | </iframe></html> | ||
+ | </code> | ||
+ | |||
+ | ---- | ||
+ | 下記でも、成功 | ||
+ | |||
+ | |||
+ | <code> | ||
+ | <html> | ||
+ | <div id="ytplayer"></div> | ||
+ | |||
+ | <script> | ||
+ | // Load the IFrame Player API code asynchronously. | ||
+ | var tag = document.createElement('script'); | ||
+ | tag.src = "https://www.youtube.com/player_api"; | ||
+ | var firstScriptTag = document.getElementsByTagName('script')[0]; | ||
+ | firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | ||
+ | |||
+ | // Replace the 'ytplayer' element with an <iframe> and | ||
+ | // YouTube player after the API code downloads. | ||
+ | var player; | ||
+ | function onYouTubePlayerAPIReady() { | ||
+ | player = new YT.Player('ytplayer', { | ||
+ | height: '360', | ||
+ | width: '640', | ||
+ | videoId: 'M7lc1UVf-VE' | ||
+ | }); | ||
+ | } | ||
+ | </script> | ||
+ | </html> | ||
+ | </code> | ||
+ | |||
+ | <html> | ||
+ | <div id="ytplayer"></div> | ||
+ | |||
+ | <script> | ||
+ | // Load the IFrame Player API code asynchronously. | ||
+ | var tag = document.createElement('script'); | ||
+ | tag.src = "https://www.youtube.com/player_api"; | ||
+ | var firstScriptTag = document.getElementsByTagName('script')[0]; | ||
+ | firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | ||
+ | |||
+ | // Replace the 'ytplayer' element with an <iframe> and | ||
+ | // YouTube player after the API code downloads. | ||
+ | var player; | ||
+ | function onYouTubePlayerAPIReady() { | ||
+ | player = new YT.Player('ytplayer', { | ||
+ | height: '360', | ||
+ | width: '640', | ||
+ | videoId: 'M7lc1UVf-VE' | ||
+ | }); | ||
+ | } | ||
+ | </script> | ||
+ | </html> | ||
====位置や大きさの書き方==== | ====位置や大きさの書き方==== |