Jump to content

Template:EmbedVideo/doc: Difference between revisions

From OkayXairen Wiki
dev>Pppery
{{ExtensionDependencies|EmbedVideo}}
 
imported>GothicDivaXX
m 1 revision imported from dev:Template:EmbedVideo/doc
 
(No difference)

Latest revision as of 05:17, 21 July 2025

Template:Mbox

Description

File:Mediawiki logo flat 2020.svg
This template uses the extension: EmbedVideo
For this template to work properly you may need to enable this extension at Special:ManageWiki/extensions#mw-section-parserhooks.

This template embeds a video from external sources like YouTube or Twitch, using mw:Extension:EmbedVideo (fork).

Syntax

Template uses unnamed parameters. Video service name and video's ID from the URL are the main parameters, examples (copied from extension documentation):

Site Service Name(s) ID Example URL Example(s)
Archive.org Videos archiveorg electricsheep-flock-244-80000-6 https://archive.org/details/electricsheep-flock-244-80000-6https://archive.org/embed/electricsheep-flock-244-80000-6
Bilibili bilibili BV1Hz4y1k7ae https://player.bilibili.com/player.html?bvid=1Hz4y1k7ae&page=1
KakaoTV kakaotv 301157950 https://play-tv.kakao.com/embed/player/cliplink/301157950
NaverTV navertv 27831593 https://tv.naver.com/embed/27831593
Niconico niconico sm40807360 https://embed.nicovideo.jp/watch/sm40807360
SoundCloud soundcloud https://soundcloud.com/skrillex/skrillex-rick-ross-purple-lamborghini
Spotify spotifyalbum - Art embed 3B61kSKTxlY36cYgzvf3cP https://open.spotify.com/album/3B61kSKTxlY36cYgzvf3cP
Spotify spotifyartist - Artist embed 0YC192cP3KPCRWx8zr8MfZ https://open.spotify.com/artist/0YC192cP3KPCRWx8zr8MfZ
Spotify spotifytrack - Song embed 6ZFbXIJkuI1dVNWvzJzown https://open.spotify.com/track/6ZFbXIJkuI1dVNWvzJzown
Twitch twitch - Live Streams twitchvod - Archived Videos on Demand twitchplayspokemon
Vimeo vimeo 105035718 http://vimeo.com/105035718
YouTube youtube - Single Videos pSsYTj9kCHE https://www.youtube.com/watch?v=pSsYTj9kCHE
YouTube youtubeplaylist - Playlists PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP https://www.youtube.com/embed/?listType=playlist&list=PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP
YouTube youtubevideolist - Video List pSsYTj9kCHE - urlargs=playlist=pSsYTj9kCHE,pSsYTj9kCHE https://www.youtube.com/embed/pSsYTj9kCHE?playlist=pSsYTj9kCHE,pSsYTj9kCHE

In simplest case without additional parameters the video will be 300px in width and placed to the right side of the of the page:

{{EmbedVideo|service|ID}}

All parameters:

{{EmbedVideo|service|ID|width|alignment|title|description}}

Usage example

Simple code:

{{EmbedVideo|youtube|9xJfPx8RViU}}

With all parameters:

{{EmbedVideo|youtube|J---aiyznGQ|500|left|Keyboard cat! - THE ORIGINAL!|This is second example}}

The width value must be just number; the alignment values are "left" and "center" ("right" is default thus can be skipped).

To skip a parameter, leave its position blank, for example default width and no title are alright but different alignment is needed:

{{EmbedVideo|youtube|SaA_cs4WZHM||left||This is third example}}

Results:

{{#ev:youtube|id=9xJfPx8RViU|autoresize=true|}}
{{#ev:youtube|id=J---aiyznGQ|autoresize=true|description=Keyboard cat! - THE ORIGINAL!}}
This is second example
{{#ev:youtube|id=SaA_cs4WZHM|autoresize=true|}}
This is third example

Notes

These are notes provided by Miraheze Developers Wiki (they can be removed after import):