Difference between revisions of "Template:Video"

From Tuflow
Jump to navigation Jump to search
(chg)
(sync with fvwiki)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
<div style="float: right">__TOC__</div>
 
<div style="float: right">__TOC__</div>
 
== Descripton ==
 
== Descripton ==
This is the '''Video''' template. It uses the [[Widget:Video|Video]] widget and supports easy embedding of a file by automatically extracting the "<code>url</code>" parameter from the <code>name</code>" from the specified file name. However, it is still possible to use the "<code>url</code>" parameter for externally hosted files.
+
This is the '''Video''' template. It uses the [[Widget:Video|Video]] widget and supports easy embedding of a file by automatically extracting the "<code>url</code>" parameter from the <code>name</code>" from the specified file name. However, it is still possible to use the "<code>url</code>" parameter for externally hosted files. It was created by [https://professional.wiki Karsten Hoffmeyer] for [https://www.pro.wiki ProWiki].
  
 
== Usage ==
 
== Usage ==
Line 37: Line 37:
 
</pre>
 
</pre>
  
 +
__NOEDITSECTION__
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<div style="max-width: {{{width|425}}}px">
+
<div style="max-width: {{{width|425}}}px;">
: {{#widget:Video
+
<div style="padding-left: 20px;">
 +
{{#widget:Video
 
  |url={{#if: {{{url|}}} |{{{url|}}} |{{filepath: {{{name|}}} }} }}
 
  |url={{#if: {{{url|}}} |{{{url|}}} |{{filepath: {{{name|}}} }} }}
 
}}
 
}}
<div>{{#if:
+
</div>
 +
</div>
 +
{{#if:
 
  {{{url|}}}
 
  {{{url|}}}
 
  |[[Category:Pages with an embedded, externally hosted video file]]
 
  |[[Category:Pages with an embedded, externally hosted video file]]
 
  |[[Category:Pages with an embedded, locally hosted video file]]
 
  |[[Category:Pages with an embedded, locally hosted video file]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 01:07, 2 December 2023

Descripton

This is the Video template. It uses the Video widget and supports easy embedding of a file by automatically extracting the "url" parameter from the name" from the specified file name. However, it is still possible to use the "url" parameter for externally hosted files. It was created by Karsten Hoffmeyer for ProWiki.

Usage

Either parameter "name" or parameter "url" must be specified. If one does not provide a value for the parameter "width", the template uses the default value of 425.

local file

{{Video
 |name=Animation_M01_Boundary_01b_test2.mp4
}}

local file with deviating width

{{Video
 |name=Animation_M01_Boundary_01b_test2.mp4
 |width=800
}}

external file

{{Video
 |url=https://pornel.net/Performance.ogg
}}

local file with deviating width

{{Video
 |url=https://pornel.net/Performance.ogg
 |width=300
}}