Widget:Video: Difference between revisions

From Knowledge-land-scape
Created page with "<noinclude>__NOTOC__ This widget allows you to embed '''[http://code.google.com/p/html5media/ HTML5 Media]''' on your wiki page. Created by [http://www.mediawikiwidgets.org/User:Taipan taipan] Modified by mm == Using this widget == <nowiki> {{#Widget:Video|webm=http://url.to/your.webm|mp4=http://url.to/your.mp4|style=}} </nowiki> For example: <nowiki> {{#Widget:Video|mp4=https://pzwiki.wdka.nl/mw-mediadesign/images/a/af/Traffic_light..."
 
No edit summary
Line 1: Line 1:
<noinclude>__NOTOC__
</noinclude><includeonly>
This widget allows you to embed '''[http://code.google.com/p/html5media/ HTML5 Media]''' on your wiki page.
<!-- Check if the widget is being used for YouTube -->
 
{{#ifeq:{{{type|}}}|youtube|
Created by [http://www.mediawikiwidgets.org/User:Taipan taipan]
<iframe width="560" height="315" src="https://www.youtube.com/embed/{{{youtube|}}}" frameborder="0" allowfullscreen></iframe>
Modified by [[User:Michael Murtaugh | mm]]
<!-- Default video handling -->
 
}}{{#if:{{{webm|}}}|
== Using this widget ==
<video style="<!--{$style}-->" controls>
 
    <source src="<!--{$webm|validate:url}-->" type="video/webm" />
<nowiki>
    <!--{/if}-->
{{#Widget:Video|webm=http://url.to/your.webm|mp4=http://url.to/your.mp4|style=}}
    <!--{if $ogg}-->
</nowiki>
    <source src="<!--{$ogg|validate:url}-->" type="video/ogg" />
 
    <!--{/if}-->
For example:
    <!--{if $mp4}-->
 
    <source src="<!--{$mp4|validate:url}-->" type="video/mp4" />
<nowiki>
    <!--{/if}-->
{{#Widget:Video|mp4=https://pzwiki.wdka.nl/mw-mediadesign/images/a/af/Traffic_lights.mp4|style=height:200px;float:right;}}
    No support for the video tag, try using a more recent browser that supports HTML5 video.
</nowiki>
</video>
 
</includeonly>
== Copy to your site ==
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
</noinclude><includeonly><video style="<!--{$style}-->" controls>No support for the video tag, try using a more recent browser that suports HTML5 video.<!--{if $webm}--><source src="<!--{$webm|validate:url}-->" type="video/webm" /><!--{/if}--><!--{if $ogg}--><source src="<!--{$ogg|validate:url}-->" type="video/ogg" /><!--{/if}--><!--{if $mp4}--><source src="<!--{$mp4|validate:url}-->" type="video/mp4" /><!--{/if}--></video></includeonly>

Revision as of 14:13, 16 September 2024