Progress Continues
We've already had 21648 updates since Dolphin 5.0. Keep up with Dolphin's continuing progress through the Dolphin Blog: February, March, and April 2024 Dolphin Progress Report. |
The Dolphin Emulator Wiki needs your help! Dolphin can play thousands of games, and changes are happening all the time. Help us keep up! Join in and help us make this the best resource for Dolphin. |
Template:EmbedVideo: Difference between revisions
Jump to navigation
Jump to search
(Update doc for 2.x version) |
|||
Line 1: | Line 1: | ||
<includeonly><!--- | |||
-->{{#vardefine:vg_used|yes}}{{#vardefine:servicename|{{#switch:{{{1}}} | |||
|dailymotion=Dailymotion | |||
|divshare=DivShare | |||
|googlevideo=Google Video | |||
|interia=Interia | |||
|youtube=YouTube | |||
|vimeo=Vimeo | |||
}}}}<!--- | |||
== | -->{{#vardefine:templatename|{{#switch:{{{1}}} | ||
== | |dailymotion=Dailymotion | ||
|divshare=DivShare | |||
|googlevideo=GoogleVideo | |||
|interia=Interia | |||
|youtube=YouTube | |||
|vimeo=Vimeo | |||
}}}}<!--- | |||
-->{{#vardefine:serviceurl|{{#switch:{{{1}}} | |||
|dailymotion=<nowiki>http://www.dailymotion.com/video/</nowiki> | |||
|divshare=<nowiki>http://www.divshare.com/download/</nowiki> | |||
|googlevideo=<nowiki>http://video.google.com/videoplay?docid=</nowiki> | |||
|interia=<nowiki>http://video.interia.pl/obejrzyj,film,</nowiki> | |||
|youtube=<nowiki>http://www.youtube.com/watch?v=</nowiki> | |||
|vimeo=<nowiki>http://vimeo.com/</nowiki> | |||
}}}}<!--- | |||
-->{{#vardefine:videoid|{{#switch:{{{1}}} | |||
|dailymotion=x1k3syf_dakar-2-hd-on-dolphin-emulator-part2_videogames | |||
|divshare=13956887-4c7 | |||
|googlevideo=163776723883589087 | |||
|interia=102988 | |||
|youtube=VqNcksMfAjM | |||
|vimeo=13118504 | |||
}}}}<!--- | |||
-->{{#vardefine:videocaption|{{#switch:{{{1}}} | |||
The | |dailymotion=Dakar 2 HD on Dolphin | ||
|divshare=It_s_A_Wonderful_World.mp4 | |||
|googlevideo=Paper Mario Speed run part 1 | |||
|interia=Na święta!!! Nintendo Wii | |||
|youtube=The Legend of Zelda: The Wind Waker Intro | |||
|vimeo=Super Mario Bros. | |||
}}}}<!--- | |||
-->This template provides a simplified way to use the [[Template:EmbedVideo|EmbedVideo]] plugin. It automatically uses the standard thumbnail size and position used on this wiki. | |||
| | |||
====<nowiki>< | == Usage == | ||
The {{#var:servicename}} template should be called in the following way: | |||
*<code><nowiki>{{</nowiki>{{#var:templatename}}<nowiki>|<videoID>|<title>|<options>}}</nowiki></code> | |||
where | |||
*<code>Video ID</code> is the ID is the bold part of the URL ({{#var:serviceurl}}'''{{#var:videoid}}''') | |||
*<code>Title</code> (optional) is the caption for the video | |||
*<code>options</code> (optional) control some other functionalities of this template. Specifying <code>br</code> in this parameter tell the template to create a new row after embedding the video. Specifying <code>link</code> makes the template return only a hiperlink to watch the video on {{#var:servicename}}. | |||
< | == Examples == | ||
* Embed a video by specifying video ID and title. Titles longer than the box will automatically be truncated. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}} with caption text longer than thumbnail box size<nowiki>|br}}</nowiki></code> will produce this: | |||
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}} with caption text longer than thumbnail box size|br}} | |||
* Embed a video by specifying only video ID, so the 2nd parameter is null. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}<nowiki>||br}}</nowiki></code> make the template use URL as title since no title was entered: | |||
{{{{#var:templatename}}|{{#var:videoid}}||br}} | |||
| | |||
| | |||
| | |||
:: | |||
| | |||
|} | |||
* Return a hiperlink to watch the video on {{#var:servicename}} by specifying video ID and title. We want only the hiperlink, so we should add the <code>link</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}<nowiki>|link}}</nowiki></code> will produce this: | |||
:{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}|link}} | |||
< | |||
* Return a hiperlink to watch the video on {{#var:servicename}} by specifying only video ID. We want only the hiperlink, so we should add the <code>link</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}<nowiki>||link}}</nowiki></code> make the template use URL as title since no title was entered: | |||
< | :{{{{#var:templatename}}|{{#var:videoid}}||link}} | ||
== Notes == | |||
< | * To use only video ID and an option, you must null the 2nd parameter by using ||, like this: <code><nowiki>{{</nowiki>{{#var:templatename}}<nowiki>|<videoID>||<options>}}</nowiki></code> | ||
* The 3rd parameter only accept one option. If you include more than one option, none of them will work. | |||
* Using multiple calls will make the videos be side-by-side (the last video should ALWAYS include the <code>br</code> tag to the 3rd parameter): | |||
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}}} | |||
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}}} | |||
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}|br}} | |||
* When you need one video in each row, you should add the <code>br</code> tag to the 3rd parameter of all videos, not just the last: | |||
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}|br}} | |||
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}|br}} | |||
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}}} | |||
* If you use this template and forget to add the <code>br</code> tag to the 3rd parameter after calling the last video, you'll get something weird, like this topic!</includeonly><noinclude> | |||
{{documentation}}</noinclude> | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
! | |||