Difference between revisions of "Template:EmbedVideo"

From Second Life Wiki
Jump to navigation Jump to search
(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>iFrame source: {{{1}}}
<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>
Caption/Attribution: {{{2}}}<html>
</html>
<iframe src="</html>{{{1}}}<html>" width="640" height="480" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe><p>{{{2}}}</p>
</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 you got from whatever video provider you've got, and put it in ''your-iframe-embed''.
<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|<a href="https://vimeo.com/4242932">Creating &amp; uploading animations</a> from <a href="https://vimeo.com/torley">Torley</a> on <a href="https://vimeo.com">Vimeo</a>.}}
{{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))