Widget:Video: Difference between revisions
The Terran Knowledge Bank
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
== Using this widget == | == Using this widget == | ||
For information on how to use this widget, see [https://www.mediawikiwidgets.org/Video widget description page on MediaWikiWidgets.org]. | For information on how to use this widget, see [https://www.mediawikiwidgets.org/Video widget description page on MediaWikiWidgets.org]. | ||
== Example with optional subtitle parameters == | |||
<pre> | |||
{{#widget:Video | |||
|url=https://download.wcnews.com/holovids/p2/game/54_S.mp4 | |||
|poster=https://download.wcnews.com/holovids/p2/game/thumbs/54_S.png | |||
|width=640 | |||
|height=360 | |||
|subs_en=https://download.wcnews.com/holovids/p2/game/subs/54_S_en.vtt | |||
|subs_de=https://download.wcnews.com/holovids/p2/game/subs/54_S_de.vtt | |||
|subs_fr=https://download.wcnews.com/holovids/p2/game/subs/54_S_fr.vtt | |||
}} | |||
</pre> | |||
== Copy to your site == | == Copy to your site == | ||
To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''. {{#if:{{{subs_en|}}}|<track label="English" kind="subtitles" srclang="en" src="<!--{$subs_en|validate:url}-->"/>}} | To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''. {{#if:{{{subs_en|}}}|<track label="English" kind="subtitles" srclang="en" src="<!--{$subs_en|validate:url}-->"/>}} | ||
</noinclude><includeonly><video src="<!--{$url|validate:url}-->" poster="<!--{$poster|validate:url}-->" width="<!--{$width|default:640|validate:int|escape:'html'}-->" height="<!--{$height|default:320|validate:int|escape:'html'}-->" controls preload="none"><!--{if isset($subs_en)}--><track label="English" kind="subtitles" srclang="en" src="<!--{$subs_en|validate:url}-->"/><!--{/if}--><!--{if isset($subs_de)}--><track label="Deutsch" kind="subtitles" srclang="de" src="<!--{$subs_de|validate:url}-->"/><!--{/if}--><!--{if isset($subs_fr)}--><track label="Français" kind="subtitles" srclang="fr" src="<!--{$subs_fr|validate:url}-->"/><!--{/if}--></video> | </noinclude><includeonly><video src="<!--{$url|validate:url}-->" poster="<!--{$poster|validate:url}-->" width="<!--{$width|default:640|validate:int|escape:'html'}-->" height="<!--{$height|default:320|validate:int|escape:'html'}-->" controls preload="none"><!--{if isset($subs_en)}--><track label="English" kind="subtitles" srclang="en" src="<!--{$subs_en|validate:url}-->"/><!--{/if}--><!--{if isset($subs_de)}--><track label="Deutsch" kind="subtitles" srclang="de" src="<!--{$subs_de|validate:url}-->"/><!--{/if}--><!--{if isset($subs_fr)}--><track label="Français" kind="subtitles" srclang="fr" src="<!--{$subs_fr|validate:url}-->"/><!--{/if}--></video> |
Latest revision as of 22:07, 16 October 2023
This widget allows you to embed HTML5 Media on your wiki page.
Created by taipan
Using this widget
For information on how to use this widget, see widget description page on MediaWikiWidgets.org.
Example with optional subtitle parameters
{{#widget:Video |url=https://download.wcnews.com/holovids/p2/game/54_S.mp4 |poster=https://download.wcnews.com/holovids/p2/game/thumbs/54_S.png |width=640 |height=360 |subs_en=https://download.wcnews.com/holovids/p2/game/subs/54_S_en.vtt |subs_de=https://download.wcnews.com/holovids/p2/game/subs/54_S_de.vtt |subs_fr=https://download.wcnews.com/holovids/p2/game/subs/54_S_fr.vtt }}
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:Video.