Difference between revisions of "Widget:Snippet"

From HaloRuns Wiki
Jump to: navigation, search
Line 16: Line 16:
 
<includeonly>
 
<includeonly>
  
<!--{if $thumbnail}-->
+
<!--{if isset($thumbnail)}-->
<!--{if $left}-->
+
<!--{if isset($left)}-->
 
<div class="thumb tleft">
 
<div class="thumb tleft">
 
<!--{/if}-->
 
<!--{/if}-->
<!--{if $right}-->
+
<!--{if isset($right)}-->
 
<div class="thumb tright">
 
<div class="thumb tright">
 
<!--{/if}-->
 
<!--{/if}-->
Line 28: Line 28:
 
<video src="<!--{$file|escape:'html'}-->" autoplay loop muted playsinline width=<!--{$width|escape:'html'|default:"100%"}--> height=<!--{$height|escape:'html'|default:"100%"}--> />
 
<video src="<!--{$file|escape:'html'}-->" autoplay loop muted playsinline width=<!--{$width|escape:'html'|default:"100%"}--> height=<!--{$height|escape:'html'|default:"100%"}--> />
  
<!--{if $thumbnail}-->
+
<!--{if isset($thumbnail)}-->
 
<div class="thumbcaption">
 
<div class="thumbcaption">
 
<!--{$caption|escape:'html'}-->
 
<!--{$caption|escape:'html'}-->

Revision as of 04:53, 21 April 2017

This allows you to embed MP4 videos as if they were a normal GIF. You use it like this;

{{#widget:Snippet|file={{filepath:TestingMp4.mp4}}|width=300|height=300}}

Where you replace 'TestingMp4.mp4' with the name of your video file. Width and height are optinal.

It will automatically mute, autoplay, and loop the video, just as if it were a GIF.