Difference between revisions of "Template:EmbedVideo"
(A quick & dirty attempt to get a template to display an iFrame (first commit!)) |
m (Obviously this doesn't work. But it would have been nice if it did!) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly><html> | ||
<iframe src="</html>{{{url}}}<html>" width="{{{width|640}}}" height="{{{height|480}}}" frameborder="{{{frameborder|0}}}" allow="{{{allow|autoplay; fullscreen; picture-in-picture}}}" {{{fullscreen|allowfullscreen}}}></iframe><p>{{{caption|Silence is golden.}}}</p> | |||
</html> | |||
<iframe src="</html>{{{ | </includeonly><noinclude> | ||
</html></includeonly><noinclude> | |||
== Usage == | == Usage == | ||
<pre><nowiki>{{EmbedVideo|your-iframe-embed|caption-or-attribution}}</nowiki></pre> | Attempts to render a video embedded in an iframe. | ||
Basically, grab the iframe link | <pre><nowiki>{{EmbedVideo|url=your-iframe-embed-url|caption=caption-or-attribution|width=480|height=640|frameborder=0|allow=autoplay; fullscreen; picture-in-picture|fullscreen=allowfullscreen}}</nowiki></pre> | ||
Basically, grab the iframe link (usually called 'share' or 'embed') from whatever video provider you've got, and put it in ''your-iframe-embed-url''. | |||
Some providers | Some providers will have different ways of generating their iframes, so you'll have to experiment a bit to see if it works.. | ||
== Example == | == Example == | ||
Attempt to embed Torley's video at https://vimeo.com/4242932. | Attempt to embed Torley's video at https://vimeo.com/4242932. | ||
Line 14: | Line 14: | ||
If this template is working, you should see it below: | If this template is working, you should see it below: | ||
<hr> | <hr> | ||
{{EmbedVideo|https://player.vimeo.com/video/4242932?h=4c11c903a6| | {{EmbedVideo|url=https://player.vimeo.com/video/4242932?h=4c11c903a6|caption=blah}} | ||
<hr> | <hr> | ||
If you just see HTML garbage, then it clearly is '''''not''''' working! | If you just see HTML garbage, then it clearly is '''''not''''' working! (As of August 2022, it's not working. — [[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] ([[User talk:Gwyneth Llewelyn|talk]]) 09:38, 23 August 2022 (PDT)) | ||
</noinclude> | </noinclude> |
Latest revision as of 09:38, 23 August 2022
Usage
Attempts to render a video embedded in an iframe.
{{EmbedVideo|url=your-iframe-embed-url|caption=caption-or-attribution|width=480|height=640|frameborder=0|allow=autoplay; fullscreen; picture-in-picture|fullscreen=allowfullscreen}}
Basically, grab the iframe link (usually called 'share' or 'embed') from whatever video provider you've got, and put it in your-iframe-embed-url.
Some providers will have different ways of generating their iframes, so you'll have to experiment a bit to see if it works..
Example
Attempt to embed Torley's video at https://vimeo.com/4242932.
If this template is working, you should see it below:
<html>
<iframe src="</html>https://player.vimeo.com/video/4242932?h=4c11c903a6<html>" width="640" height="480" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
blah
</html>
If you just see HTML garbage, then it clearly is not working! (As of August 2022, it's not working. — Gwyneth Llewelyn (talk) 09:38, 23 August 2022 (PDT))