×
Create a new article
Write your page title here:
We currently have 2,853 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



YumeWiki
2,853Articles

Help:Embedding videos: Difference between revisions

(create with only basic content)
 
(add playlist guide and beginning of parameter table)
 
(One intermediate revision by the same user not shown)
Line 20: Line 20:
{{#ev:youtube|SFcuEQyO1O8|320x180|center|<center>[[Yume Nikki:Effects#Towel|Towel]] effect guide</center>}}
{{#ev:youtube|SFcuEQyO1O8|320x180|center|<center>[[Yume Nikki:Effects#Towel|Towel]] effect guide</center>}}


Since the default value of <code>alignment</code> is <code>center</code>, it can be left blank for the same result. Another thing to be aware of is that <code><nowiki><center></nowiki></code> tags placed on the outside of the <code>#ev</code> tag will only center the text, and not effect the alignment of the whole element. The following example would result in the exact same output as the previous:
Since the default value for alignment is <code>center</code>, it can be left blank for the same result. Another thing to be aware of is that <code><nowiki><center></nowiki></code> tags placed on the outside of the <code>#ev</code> tag will only center the text, and not effect the alignment of the whole element. The following example would result in the exact same output as the previous:
<pre>
<pre>
<center>{{#ev:youtube|SFcuEQyO1O8|320x180||[[Yume Nikki:Effects#Towel|Towel]] effect guide}}</center>
<center>{{#ev:youtube|SFcuEQyO1O8|320x180||[[Yume Nikki:Effects#Towel|Towel]] effect guide}}</center>
Line 32: Line 32:


==Inline Videos==
==Inline Videos==
The <code>alignment</code> of a video can be give a value of <code>inline</code> to allow for more freedom in displaying it on the page. One major use to this is displaying videos side by side. The following example was used in [[Special:Permalink/480901|this revision]] of [[Yume Nikki:Frog]].  
The alignment of a video can be give a value of <code>inline</code> to allow for more freedom in displaying it on the page. One major use to this is displaying videos side-by-side. The following example was used in [[Special:Permalink/480901#Video|this revision]] of [[Yume Nikki:Frog]]. The use of <code><nowiki><center></nowiki></code> tags around the two videos centers both videos ''together'' – using <code>center</code> for each video alignment would not put them side-by-side.
<pre style="line-height:1.5em;">
<pre style="line-height:1.5em;">
<center>
<center>
Line 46: Line 46:


==Align in a Gallery==
==Align in a Gallery==
Videos can be included at the end of a gallery as if it was part of the gallery itself by using the following syntax:
<pre>
<gallery style="display:inline">
</gallery>
<small>{{#ev:service|id|150x140|inline|description}}</small>
</pre>
The use of <code>inline</code> for alignment is a requirement. The dimensions are an example that is close to the space gallery images take up, so the video mimics an image. The <code><nowiki><small></nowiki></code> tags make the video description show with the same size as gallery captions.
For an example that uses this style of embed, see [[Special:Permalink/480944#Gallery|this revision]] of [[Yume Nikki:Block World]].


==Playlists==
==Playlists==
You can make a temporary playlist of videos that play in sequence, which also allows users to navigate between multiple videos using a menu. To do this for YouTube videos, use the following syntax:
<pre>
{{#ev:youtubevideolist|coverid|dimensions|alignment|description|container|playlist=id0,id1,id2}}
</pre>
'''Any parameter you wish to leave blank must have a blank space with a pipe - you must have the same number of parameters.''' The <code>container</code> parameter will likely always be blank.
The value <code>coverid</code> is what appears before the user interacts with the embed, though in practice you would likely want this to match the first id of the playlist. The playlist can have a flexible number of comma-separated watch ids, and they will appear in the playlist in the same order.
For an example, see [[Special:Permalink/481027|this revision]] of [[Yume Nikki:Effects]].


==More Options==
==More Options==
Line 54: Line 73:


===Thumbnail===
===Thumbnail===
===Full List of Parameters===
If you wish to use other options that were not explained previously in this guide, the below table lists all possible parameters and all possible values for each.
{|class="wikitable mw-collapsible mw-collapsed" width="100%"
|+ Parameter List
|-
!Parameter
!Description
!Possible Values
|-
|<code>service</code><br><code>0</code>
|The service that hosts the video(s). Technically not a parameter, but instead the main input of the function.
;Suggested values
:<code>youtube</code> <code>youtubevideolist</code> <code>niconico</code>
|{{#arraymap:archiveorg, bandcamp, bilibili, dailymotion, niconico, youtube
|,|@|<code>@</code>|\s}}
|-
|<code>id</code> <code>1</code>
|The id…
|''Dependent on service''
|-
|dimensions 2
|
|
|}


[[Category:Help]]
[[Category:Help]]
[[Category:Editing help]]
[[Category:Editing help]]

Latest revision as of 15:03, 10 July 2024

This page is a guide for embedding videos on YumeWiki. Videos are usually embedded using the #ev tag added by the EmbedVideo extension.

Basic Embeds

The usual syntax:

{{#ev:service|id|dimensions|alignment|description}}

An example for syntax that skips dimensions and alignment (notice the empty inputs):

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

Examples

The following example embeds a youtube video using a small size, centers the video on the page, and uses a description that combines wikitext with <center> tags.

{{#ev:youtube|SFcuEQyO1O8|320x180|center|<center>[[Yume Nikki:Effects#Towel|Towel]] effect guide</center>}}
Towel effect guide

Since the default value for alignment is center, it can be left blank for the same result. Another thing to be aware of is that <center> tags placed on the outside of the #ev tag will only center the text, and not effect the alignment of the whole element. The following example would result in the exact same output as the previous:

<center>{{#ev:youtube|SFcuEQyO1O8|320x180||[[Yume Nikki:Effects#Towel|Towel]] effect guide}}</center>
Towel effect guide

In this example, the same video was made to float to the right, with a smaller width. The tag was used before this paragraph. If you are on a mobile device, you may notice the element does not become centered, unlike floating images. This causes the text to wrap and can make pages hard to read. The input used was the following:

{{#ev:youtube|SFcuEQyO1O8|240x180|right|<center>[[Yume Nikki:Effects#Towel|Towel]] effect guide</center>}}

Inline Videos

The alignment of a video can be give a value of inline to allow for more freedom in displaying it on the page. One major use to this is displaying videos side-by-side. The following example was used in this revision of Yume Nikki:Frog. The use of <center> tags around the two videos centers both videos together – using center for each video alignment would not put them side-by-side.

<center>
{{#ev:youtube|8p4EY8LVcpg|320x180|inline|How to find the Frog in Forest World.}}
{{#ev:youtube|TzlvlIrAkP0|320x180|inline|How to find the Frog in the Dense Woods B.}}
</center>
How to find the Frog in Forest World.
How to find the Frog in the Dense Woods B.

Align in a Gallery

Videos can be included at the end of a gallery as if it was part of the gallery itself by using the following syntax:

<gallery style="display:inline">
…
</gallery>
<small>{{#ev:service|id|150x140|inline|description}}</small>

The use of inline for alignment is a requirement. The dimensions are an example that is close to the space gallery images take up, so the video mimics an image. The <small> tags make the video description show with the same size as gallery captions.

For an example that uses this style of embed, see this revision of Yume Nikki:Block World.

Playlists

You can make a temporary playlist of videos that play in sequence, which also allows users to navigate between multiple videos using a menu. To do this for YouTube videos, use the following syntax:

{{#ev:youtubevideolist|coverid|dimensions|alignment|description|container|playlist=id0,id1,id2}}

Any parameter you wish to leave blank must have a blank space with a pipe - you must have the same number of parameters. The container parameter will likely always be blank.

The value coverid is what appears before the user interacts with the embed, though in practice you would likely want this to match the first id of the playlist. The playlist can have a flexible number of comma-separated watch ids, and they will appear in the playlist in the same order.

For an example, see this revision of Yume Nikki:Effects.

More Options

Start Time

Thumbnail

Full List of Parameters

If you wish to use other options that were not explained previously in this guide, the below table lists all possible parameters and all possible values for each.

Parameter List
Parameter Description Possible Values
service
0
The service that hosts the video(s). Technically not a parameter, but instead the main input of the function.
Suggested values
youtube youtubevideolist niconico
archiveorg bandcamp bilibili dailymotion niconico youtube
id 1 The id… Dependent on service
dimensions 2