Jump to content

Help:Embedding Video files: Difference between revisions

no edit summary
(Started page)
 
No edit summary
Line 1: Line 1:
This page will contain instructions on how to embed video files
The EmbedVideo parser function expects to be called in any of the following ways:
 
====<code>#ev</code> - Classic parser tag====
* <code><nowiki>{{#ev:service|id}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container|urlargs}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize|valignment}}</nowiki></code>
 
However, if needed optional arguments may be left blank by not putting anything between the pipes:
* <code><nowiki>{{#ev:service|id|||description}}</nowiki></code>
 
====<code>#evt</code> - Parser tag for templates====
=== Tags ===
 
The EmbedVideo parser function expects to be called in any of the following ways:
 
====<code>#ev</code> - Classic parser tag====
* <code><nowiki>{{#ev:service|id}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container|urlargs}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize}}</nowiki></code>
* <code><nowiki>{{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize|valignment}}</nowiki></code>
 
However, if needed optional arguments may be left blank by not putting anything between the pipes:
* <code><nowiki>{{#ev:service|id|||description}}</nowiki></code>
 
====<code>#evt</code> - Parser tag for templates====
The <nowiki>#evt</nowiki> parser tag allows for key=value pairs which allows for easier templating and readability.
 
<pre><nowiki>{{#evt:
service=youtube
|id=https://www.youtube.com/watch?v=pSsYTj9kCHE
|alignment=right
}}</nowiki></pre>
 
====<code>#evu</code> - Parser tag for URLs====
The <nowiki>#evu</nowiki> parser tag is like the <nowiki>#evt</nowiki> tag, but its first parameter is a URL that will be parsed to determine the service automatically.
 
<pre><nowiki>{{#evu:https://www.youtube.com/watch?v=pSsYTj9kCHE
|alignment=right
}}</nowiki></pre>
 
====Tag hook====
Videos can easily be embedded with the <nowiki><embedvideo></embedvideo></nowiki> tag hook.  The ID/URL goes as the input between the tags and parameters can be added as the tag arguments.
 
<pre><nowiki><embedvideo service="youtube">https://www.youtube.com/watch?v=pSsYTj9kCHE</embedvideo></nowiki></pre>
 
Alternativly, you can also use the service id as the tag (assuming another extension isn't already using this tag).
 
<pre><nowiki><youtube>https://www.youtube.com/watch?v=pSsYTj9kCHE</youtube></nowiki></pre>