Difference between revisions of "Widget:Trailer"

From UnderWiki
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').setAttribute('src', 'https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'|default:'-sX3wsh02fs'}--><!--{/if}-->?autoplay=1;" 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="youtube_video" border="0" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"> </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('youtube_video').setAttribute('src', 'https://www.youtube.com/embed/<!--{if isset($playlist)}-->?listType=playlist&list=<!--{$playlist|escape:'urlpathinfo'}--><!--{else}--><!--{$id|escape:'urlpathinfo'|default:'-sX3wsh02fs'}--><!--{/if}-->?autoplay=1;" 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="youtube_video" border="0" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"> </iframe></div></includeonly>

Revision as of 07:18, 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.