Help:Embedding Video files: Difference between revisions

    From BelieveTheSign
    (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>

    Revision as of 04:21, 12 March 2020

    The EmbedVideo parser function expects to be called in any of the following ways:

    #ev - Classic parser tag

    • {{#ev:service|id}}
    • {{#ev:service|id|dimensions}}
    • {{#ev:service|id|dimensions|alignment}}
    • {{#ev:service|id|dimensions|alignment|description}}
    • {{#ev:service|id|dimensions|alignment|description|container}}
    • {{#ev:service|id|dimensions|alignment|description|container|urlargs}}
    • {{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize}}
    • {{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize|valignment}}

    However, if needed optional arguments may be left blank by not putting anything between the pipes:

    • {{#ev:service|id|||description}}

    #evt - Parser tag for templates

    Tags

    The EmbedVideo parser function expects to be called in any of the following ways:

    #ev - Classic parser tag

    • {{#ev:service|id}}
    • {{#ev:service|id|dimensions}}
    • {{#ev:service|id|dimensions|alignment}}
    • {{#ev:service|id|dimensions|alignment|description}}
    • {{#ev:service|id|dimensions|alignment|description|container}}
    • {{#ev:service|id|dimensions|alignment|description|container|urlargs}}
    • {{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize}}
    • {{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize|valignment}}

    However, if needed optional arguments may be left blank by not putting anything between the pipes:

    • {{#ev:service|id|||description}}

    #evt - Parser tag for templates

    The #evt parser tag allows for key=value pairs which allows for easier templating and readability.

    {{#evt:
    service=youtube
    |id=https://www.youtube.com/watch?v=pSsYTj9kCHE
    |alignment=right
    }}

    #evu - Parser tag for URLs

    The #evu parser tag is like the #evt tag, but its first parameter is a URL that will be parsed to determine the service automatically.

    {{#evu:https://www.youtube.com/watch?v=pSsYTj9kCHE
    |alignment=right
    }}

    Tag hook

    Videos can easily be embedded with the <embedvideo></embedvideo> tag hook. The ID/URL goes as the input between the tags and parameters can be added as the tag arguments.

    <embedvideo service="youtube">https://www.youtube.com/watch?v=pSsYTj9kCHE</embedvideo>

    Alternativly, you can also use the service id as the tag (assuming another extension isn't already using this tag).

    <youtube>https://www.youtube.com/watch?v=pSsYTj9kCHE</youtube>