Difference between revisions of "Widget:Snippet"

From HaloRuns Wiki
Jump to: navigation, search
Line 25: Line 25:
 
<!--{/if}-->
 
<!--{/if}-->
 
<div class="thumbinner" style="width: <!--{$width+2|escape:'html'|validate:int|default:"100%"}-->px;">
 
<div class="thumbinner" style="width: <!--{$width+2|escape:'html'|validate:int|default:"100%"}-->px;">
 +
<a href="<!--{$file|validate:int|escape:'html'}-->" >
 
<!--{/if}-->
 
<!--{/if}-->
  
<video class="thumbimage" style="max-width: <!--{$width|escape:'html'|validate:int|default:"100%"}-->px;max-height: <!--{$height|validate:int|escape:'html'|default:"100%"}-->px;width: auto; height: auto;" src="<!--{$file|validate:int|escape:'html'}-->" autoplay loop muted playsinline />
+
<video class="thumbimage" style="max-width: <!--{$width|escape:'html'|validate:int|default:"100%"}-->px;max-height: <!--{$height|escape:'html'|default:"100%"}-->px;width: auto; height: auto;" src="<!--{$file|validate:int|escape:'html'}-->" autoplay loop muted playsinline />
  
 
<!--{if isset($thumbnail)}-->
 
<!--{if isset($thumbnail)}-->
 +
</a>
 
<div class="thumbcaption">
 
<div class="thumbcaption">
 
<!--{$caption|escape:'html'}-->
 
<!--{$caption|escape:'html'}-->

Revision as of 05:43, 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.