Difference between revisions of "Widget:Trailer"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
[[Category:Widgets]] | [[Category:Widgets]] | ||
− | </noinclude><includeonly><style>.youtube img{-webkit-transition: opacity 0.5s ease;transition: opacity 0.5s ease;} .youtube img:hover{opacity: 0.5;}</style><div class="youtube" onclick="this.style.display='none'; this.nextElementSibling.style.display='block'; document.getElementById('vid').play();" style="width:<!--{$width|escape:'html'|default:'430'}-->px;height:<!--{$height|escape:'html'|default:242}-->px;background-image: url('<!--{$placeholder|escape:'urlpathinfo'|default:'http://underwiki.com/images/5/58/Trailer.png'}-->');background-size:<!--{$width|escape:'html'|default:'430'}-->px <!--{$height|escape:'html'|default:242}-->px"><img width="<!--{$width|escape:'html'|default:'430'}-->" height="<!--{$height|escape:'html'|default:242}-->" src="http://underwiki.com/images/9/90/Play.png" /></div><div class="youtube_player" style="display:none"><iframe width="<!--{$width|escape:'html'|default:'430'}-->" height="<!--{$height|escape:'html'|default:242}-->" src="https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'|default:'-sX3wsh02fs'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe></div></includeonly> | + | </noinclude><includeonly><style>.youtube img{-webkit-transition: opacity 0.5s ease;transition: opacity 0.5s ease;} .youtube img:hover{opacity: 0.5;}</style><div class="youtube" onclick="this.style.display='none'; this.nextElementSibling.style.display='block'; document.getElementById('vid').play();" style="width:<!--{$width|escape:'html'|default:'430'}-->px;height:<!--{$height|escape:'html'|default:242}-->px;background-image: url('<!--{$placeholder|escape:'urlpathinfo'|default:'http://underwiki.com/images/5/58/Trailer.png'}-->');background-size:<!--{$width|escape:'html'|default:'430'}-->px <!--{$height|escape:'html'|default:242}-->px"><img width="<!--{$width|escape:'html'|default:'430'}-->" height="<!--{$height|escape:'html'|default:242}-->" src="http://underwiki.com/images/9/90/Play.png" /></div><div class="youtube_player" style="display:none"><iframe id="vid" width="<!--{$width|escape:'html'|default:'430'}-->" height="<!--{$height|escape:'html'|default:242}-->" src="https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'|default:'-sX3wsh02fs'}--><!--{/if}-->" frameborder="0" allowfullscreen></iframe></div></includeonly> |
Revision as of 06:57, 2 April 2019
This widget is used to embed the YouTube trailer.
Parameters
- id
- The YouTube ID of the video to play. This can be found in the URL (i.e., https://www.youtube.com/watch?v=meuys4JZZxA)
- playlist
- The YouTube PlayList to play. Only specify an ID or a PlayList.
- height / width
- Height and width of the map pane, in pixels. Default is 430 x 242
- placeholder
- URL of the image to show before playing.