Help:Embedding Video files: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The EmbedVideo parser function expects to be called in any of the following ways: | The EmbedVideo parser function expects to be called in any of the following ways: |
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
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>