PHPackages                             starcitizenwiki/embedvideo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. starcitizenwiki/embedvideo

ActiveMediawiki-extension[Image &amp; Media](/categories/media)

starcitizenwiki/embedvideo
==========================

Adds a parser function embedding video from popular sources.

4.0.0(7mo ago)398.5k23[19 issues](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/issues)[2 PRs](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/pulls)MITPHPPHP &gt;=8.0.0CI passing

Since Jun 2Pushed 1w ago2 watchersCompare

[ Source](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo)[ Packagist](https://packagist.org/packages/starcitizenwiki/embedvideo)[ RSS](/packages/starcitizenwiki-embedvideo/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (6)Versions (33)Used By (0)Security (1)

 [ ![](https://camo.githubusercontent.com/a9e1ea0a6e9a6e1ad7cc7f02f6f31108b3459d413c421a82bba60e406cec8a4f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f73746172636974697a656e77696b692f6d6564696177696b692d657874656e73696f6e732d456d626564566964656f) ](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/releases/latest) [ ![](https://camo.githubusercontent.com/1550949746c840864fae565b12ed3c2fe4e15ad7c59858e7a7f28affec5660ca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d73746172636974697a656e77696b69253246656d626564766964656f2d677265656e) ](https://packagist.org/packages/starcitizenwiki/embedvideo) [ ![](https://camo.githubusercontent.com/7be4d46299fc09efdc90bd3a9843865ecf8a733a2214f54952553c5fdd0c0e53/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f726571756573742d6e6577253230736572766963652d696e666f726d6174696f6e616c) ](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/issues/new?assignees=&labels=enhancement&template=embed-service-request.md&title=Embed+Service+Request%3A+Service+Name)

Extension Embed Video
=====================

[](#extension-embed-video)

[![](docs/example-cover.png)](docs/example-cover.png)[![](docs/example-consent.png)](docs/example-consent.png)

The EmbedVideo Extension is a MediaWiki extension which adds a parser function called `#ev` and various parser tags like `` for embedding video clips from various video sharing services. It also adds video and audio media handlers to support transforming standard `[[File:Example.mp4]]` file links into embedded HTML5 `` and `` tags.

This privacy enhanced fork adds a toggleable setting that only loads external content *after* the user gave explicit consent by clicking the video. Do note that thumbnails are still fetched from the respective service, which results in a connection to an external url. This behaviour can be disabled by setting `$wgEmbedVideoFetchExternalThumbnails` to `false`.

Issues, bug reports, and feature requests may be created at the issue tracker:

The original MediaWiki extension page is located at:

History
-------

[](#history)

Large parts of the codebase are taken from [Extension:EmbedVideo v2.9.0](https://gitlab.com/hydrawiki/extensions/EmbedVideo/-/releases/v2.9.0).

License
=======

[](#license)

EmbedVideo is released under the MIT license

See LICENSE for more details

Installation
============

[](#installation)

Download
--------

[](#download)

There are three places to download the EmbedVideo extension. The first is directly from its GitHub project page, where active development takes place. If you have git, you can use this incantation to check out a read-only copy of the extension source:

```
git clone https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo.git

```

Downloadable archive packages for numbered releases will also be available from the github project page.

Installation Instructions
-------------------------

[](#installation-instructions)

1. Download the contents of the extension, as outlined above.
2. Create an EmbedVideo folder in the extensions/ folder of your MediaWiki installation.
3. Copy the contents of this distribution into that folder
4. Install FFmpeg, when using the local video handler (enabled by default)

Add the following line to your LocalSettings.php:

```
wfLoadExtension("EmbedVideo");
```

Usage
=====

[](#usage)

Media Handler
-------------

[](#media-handler)

For locally uploaded content the process for displaying it on a page is the same as an image. [See the image syntax documentation](https://www.mediawiki.org/wiki/Help:Images#Syntax) on MediaWiki.org for complete reference on this feature.

This example would display a video in page using a HTML5 `` tag.

```
[[File:Example.mp4]]

```

To specify the start and end timestamps in the media use the start and end parameters. The timestamp can be formatted as one of: ss, :ss, mm:ss, hh:mm:ss, or dd:hh:mm:ss.

```
[[File:Example.mp4|start=2|end=6]]

```

Additionally, a cover image can be set for video files by specifying a `cover=` key.

```
[[File:Example.mp4|start=2|end=6|poster=File:LocalFile.png]]

```

### Example

[](#example)

[![](docs/local_file_with_cover.png)](docs/local_file_with_cover.png)Example of a local file with a custom cover image.

### Available options

[](#available-options)

The following options are available when using the media handler for local files. Options are added to the wikitext like `|poster=File:...` or `|start=2`.

- loop
    - Loops the audio / video
- autoplay
    - Automatically plays the file
- nocontrols
    - Disables the control elements

Options only available for video files:

- poster / cover
    - Sets a local image file as the cover of the video
- muted
    - Mutes the audio track of the video (required for autoplay)
- gif
    - Special option that sets autoplay, muted, loop and nocontrols e.g. makes the video behave like a gif

When `$wgEmbedVideoUseEmbedStyleForLocalVideos` is enabled two additional options are available

- title
    - Title of the video
- description
    - Description shown below the video

Tags
----

[](#tags)

The EmbedVideo parser function expects to be called in any of the following ways:

### \#ev - Classic Parser Tag

[](#ev---classic-parser-tag)

- `{{#ev:service|id}}`
- `{{#ev:service|id|dimensions}}`
- `{{#ev:service|id|dimensions|alignment}}`
- `{{#ev:service|id|dimensions|alignment|description}}`
- `{{#ev:service|id|dimensions|alignment|description|container}}`
- `{{#ev:service|id|dimensions|alignment|description|container|urlargs}}`

However, if needed optional arguments may be left blank by not putting anything between the pipes:

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

Alternatively each parameter can be used in any order as a named parameter. The following parameter are available:

- `id`
- `dimensions`
- `alignment`
- `description`
- `container`
- `urlArgs`
- `autoresize`
    - Set `|autoresize=true` to have the embed automatically use all available width of the parent element
- `vAlignment`
- `width`
- `height`
- `poster` / `cover`
    - This only has an effect if `$wgEmbedVideoRequireConsent` is set to true
- `title`
    - This only has an effect if `$wgEmbedVideoRequireConsent` is set to true

**Do note** mixing named and unnamed parameters will require you to add all unnamed parameters (and blanks) in the previously mentioned order. E.g. using named id and unnamed description `{{#ev:service||||This is the Description|id=abc}}`/ `{{#ev:service|id=abc|||This is the Description}}`

### \#evu - Embed Video Url

[](#evu---embed-video-url)

The `{{#evu}}` parser function tries to extract the service from the host name of an url.

It takes the same arguments as `{{#ev}}`.

### \#evl - Embed Video Link

[](#evl---embed-video-link)

The support for `{{#evl}} / {{#vlink}}` and ` / ` has been added with version 3.4.0.

The link parser function takes the following arguments:

- `id` - Video ID
- `text` - Link Text
- `player` - ID of the `` if multiple exist on a page
- `service` - Name of the embed service, defaults to YouTube

Named arguments can be passed in any order, unnamed args must be passed in the order defined above.

#### &lt;evlplayer&gt; / &lt;vplayer&gt;

[](#evlplayer--vplayer)

The corresponding player that plays the videos defined by `{{#evl}}` links.

Note that this implementation differs from EmbedVideo v2.x in the following areas:

- No `default content` is supported, i.e. text inside the tags
- If no `defaultid` is provided, the player displays a visible placeholder container (service=`videolink`) until a link is clicked
    - This restores legacy usage where a single player sits above a list of links
- No `style` attribute can be set
- Video lists are not supported
- This currently disregards `$wgEmbedVideoFetchExternalThumbnails` and will fetch thumbnails upon clicking a link

### Example

[](#example-1)

```
`
{{#evl:21X5lGlDOfg|NASA Live|player=example-player}}`
{{#evl:6ZFbXIJkuI1dVNWvzJzown|text=Spotify Track|service=spotifytrack|player=example-player}}
```

Shows a YouTube embed for the video `pSsYTj9kCHE` and two video links, one for another YouTube video (NASA Live) and a Spotify track.

When `defaultid` is omitted, a placeholder player is shown until a link is clicked. You can style this placeholder via CSS, e.g.:

```
.embedvideo.evlplayer[data-service="videolink"] .embedvideo-wrapper {
  background: #000; /* visible area before a link is clicked */
}
```

Tip: `` accepts either `id` or `player` as the player name; if both are provided, `player` takes precedence.

Examples
--------

[](#examples)

SharePoint
----------

[](#sharepoint)

For more information on SharePoint embeds see [Issue #60](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/issues/60#issuecomment-1641493146).

### YouTube Examples

[](#youtube-examples)

#### YouTube Example #1

[](#youtube-example-1)

For example, a video from YouTube use the 'youtube' service selector enter the raw ID:

```
{{#ev:youtube|pSsYTj9kCHE}}

```

Or the full URL:

```
{{#ev:youtube|https://www.youtube.com/watch?v=pSsYTj9kCHE}}

```

#### YouTube Example #2

[](#youtube-example-2)

To display the same video as a right aligned large thumbnail with a description:

```
{{#ev:youtube|https://www.youtube.com/watch?v=pSsYTj9kCHE|1000|right|Example description|frame}}

```

#### YouTube Example #3

[](#youtube-example-3)

Creating a video list for Youtube. This allows you to queue a set of video in a temporary playlist. Use the `youtubevideolist` service selector:

```
{{#ev:youtubevideolist|-D--GWwca0g|||||playlist=afpRzcAAZVM,gMEHZPZTAVc,lom_plwy9iA,BSWYMQEQhEo,EREaWhXj4_Q}}

```

#### YouTube Example #4

[](#youtube-example-4)

Using the service name as a parser tag

```
https://www.youtube.com/watch?v=eAORm-8b1Eg

```

#### YouTube Example #5

[](#youtube-example-5)

Using a local file as an embed thumbnail

```
{{#ev:youtube|pSsYTj9kCHE|poster=File:LocalFile.jpg}}

```

#### YouTube Example #6

[](#youtube-example-6)

Using a local file as an embed thumbnail and specifying a title

```
{{#ev:youtube|pSsYTj9kCHE|poster=File:LocalFile.jpg|title=Title of the Embed}}

```

#### YouTube Example #7

[](#youtube-example-7)

Using named parameters

```
{{#ev:youtube|id=pSsYTj9kCHE|dimensions=320x320}}

```

#### YouTube Example #8

[](#youtube-example-8)

For YouTube to have the video start at a specific time code utilize the urlargs(URL arguments) parameter. Take the rest of the URL arguments from the custom URL and place them into the urlargs.

Please note that not all video services support extra URL arguments or may have different keys for their URL arguments.

```
https://www.youtube.com/watch?v=pSsYTj9kCHE&start=76

{{#ev:youtube|https://www.youtube.com/watch?v=pSsYTj9kCHE|||||start=76}}

```

or

```
{{#ev:youtube|pSsYTj9kCHE|||||start=32}}

```

or

```
{{#ev:youtube|id=pSsYTj9kCHE|urlArgs=start=32}}

```

or

```
{{#ev:youtube|id=pSsYTj9kCHE|urlArgs=start=32&end=42}}

```

Supported Services
------------------

[](#supported-services)

As of version 3.x, EmbedVideo supports embedding video content from the following services:

SiteService Name(s)ID ExampleURL Example(s)[Archive.org Videos](https://archive.org/details/movies)`archiveorg`electricsheep-flock-244-80000-6
[Bandcamp](https://bandcamp.com/)`bandcamp`1003592798 (Click on share/embed, and copy the id after `album=`)[Bilibili](https://www.bilibili.com/)`bilibili`BV1Hz4y1k7ae[https://player.bilibili.com/player.html?bvid=1Hz4y1k7ae&amp;amp;page=1](https://player.bilibili.com/player.html?bvid=1Hz4y1k7ae&amp;page=1)[Aparat](https://www.aparat.com/)`aparat`rajj65c
[DailyMotion](https://dailymotion.com/)`dailymotion`x1adiiw\_archer-waking-up-as-h-jon-benjamin\_shortfilms[http://www.dailymotion.com/video/x1adiiw\_archer-waking-up-as-h-jon-benjamin\_shortfilms](http://www.dailymotion.com/video/x1adiiw_archer-waking-up-as-h-jon-benjamin_shortfilms)[Deezer](http://www.deezer.com/)`deezeralbum` - Album embed15684526[Deezer](http://www.deezer.com/)`deezerartist` - Artist embed12051760[Deezer](http://www.deezer.com/)`deezerepisode` - Podcast episodes772582731[Deezer](http://www.deezer.com/)`deezerplaylist` - Artist/user playlists1282495565[Deezer](http://www.deezer.com/)`deezertrack` - Song embed144566568[Deezer](http://www.deezer.com/)`deezershow` - Podcasts / Shows1129782[KakaoTV](https://tv.kakao.com/)`kakaotv`301157950[Loom](https://www.loom.com/)`loom`e5b8c04bca094dd8a5507925ab887002[NaverTV](https://tv.naver.com/)`navertv`27831593[Niconico](http://nicovideo.jp/)`niconico`sm40807360SharePoint`sharepoint`Not Applicablehttps://\[SUB\].sharepoint.com/sites/\[PATH\]/\_layouts/15/embed.aspx?UniqueId=\[ID\]&amp;embed=\[...\][SoundCloud](http://soundcloud.com/)`soundcloud`[Podbean](https://www.podbean.com/)`podbean`re9b6-13cbd09-pb[Spotify](http://spotify.com/)`spotifyalbum` - Art embed3B61kSKTxlY36cYgzvf3cP[Spotify](http://spotify.com/)`spotifyartist` - Artist embed0YC192cP3KPCRWx8zr8MfZ[Spotify](https://spotify.com/)`spotifyplaylist` - Playlist embed37i9dQZF1DXcBWIGoYBM5M[Spotify](http://spotify.com/)`spotifytrack` - Song embed6ZFbXIJkuI1dVNWvzJzown[Spotify](http://spotify.com/)`spotifyshow` - Podcasts / Shows7AWhoFQ3SIkEc6Yp1aOiIM[Spotify](http://spotify.com/)`spotifyepisode` - Podcast episodes11mET6sr9ghOJ6mi4lmZmZ[Tidal](http://tidal.com/)`tidalalbum` - Album embed3B61kSKTxlY36cYgzvf3cP[Tidal](http://tidal.com/)`tidalmix` - Radio/mix stations0YC192cP3KPCRWx8zr8MfZ[Tidal](http://tidal.com/)`tidaltrack` - Song embed6ZFbXIJkuI1dVNWvzJzown[Tidal](http://tidal.com/)`tidalvideo` - Music videos11mET6sr9ghOJ6mi4lmZmZ[Takhtesefid](https://takhtesefid.org/)`takhtesefid`123456789
[Twitch](http://www.twitch.tv)`twitch` - Live Streams`twitchvod` - Archived Videos on Demandtwitchplayspokemon[Vimeo](http://www.vimeo.com)`vimeo`105035718[VK](https://vkvideo.ru/)`vk`-22822305\_456241864[http://vkvideo.ru/video-22822305\_456241864](http://vkvideo.ru/video-22822305_456241864)[Wistia](http://wistia.com)`wistia`62svuailn2[YouTube](http://www.youtube.com/)`youtube` - Single VideospSsYTj9kCHE[YouTube](http://www.youtube.com/)`youtubeplaylist` - PlaylistsPLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP[https://www.youtube.com/embed/?listType=playlist&amp;list=PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP](https://www.youtube.com/embed/?listType=playlist&list=PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP)[YouTube](http://www.youtube.com/)`youtubevideolist` - Video ListpSsYTj9kCHE - urlargs=playlist=pSsYTj9kCHE,pSsYTj9kCHE[Reddit](https://www.reddit.com/)`reddit`/r/crystalgrowing/comments/1k33pyx/erythritol[Youku](http://www.youku.com/)`youku`XMzc0Mzg4NTE5Mg### New Services

[](#new-services)

New services can be requested by using the following [link](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/issues/new?assignees=&labels=enhancement&template=embed-service-request.md&title=Embed+Service+Request%3A+Service+Name) or clicking `New Issue`.

Configuration Settings
======================

[](#configuration-settings)

VariableDefault ValueDescription$wgEmbedVideoAddFileExtensionstrueBoolean - Enable or disable adding video/audio file extensions to the list of allowable files to be uploaded.$wgEmbedVideoEnableVideoHandlertrueBoolean - Enable or disable the video media handlers for displaying embedded video in articles.$wgEmbedVideoEnableAudioHandlertrueBoolean - Enable or disable the audio media handlers for displaying embedded audio in articles.$wgEmbedVideoLazyLoadLocalVideosfalseBoolean - Sets 'preload="none"' on every $wgEmbedVideoUseEmbedStyleForLocalVideosfalseBoolean - Styles local videos like they are embedded content. DO NOTE: When changing this, every page with a local video needs to be updated in the parser cache!$wgEmbedVideoDefaultWidth320Integer - Globally override the default width of video players. When not set this uses the video service's default width which is typically 640 pixels.$wgEmbedVideoMinWidthnullInteger - Minimum width of video players. Widths specified below this value will be automatically bounded to it.$wgEmbedVideoMaxWidthnullInteger - Maximum width of video players. Widths specified above this value will be automatically bounded to it.$wgFFprobeLocation/usr/bin/ffprobeString - Set the location of the ffprobe binary.$wgEmbedVideoEnabledServicesnullArray - Array of service names that are allowed, if empty all services are available.$wgEmbedVideoRequireConsenttrueBoolean - Set to true to *only* load the iframe if the user clicks it.$wgEmbedVideoFetchExternalThumbnailstrueBoolean - Set to false to disable fetching video thumbnails from the external video provider. Currently only works for YouTube and Vimeo.Credits
=======

[](#credits)

The original version of EmbedVideo was written by Jim R. Wilson. Additional major upgrades made by Andrew Whitworth, Alexia E. Smith, and other contributors.

See [CREDITS](CREDITS.md) for details

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance72

Regular maintenance activity

Popularity36

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~61 days

Recently: every ~158 days

Total

26

Last Release

229d ago

Major Versions

3.4.3 → 4.0.02025-08-04

PHP version history (2 changes)3.0.0PHP &gt;=7.0.0

3.3.0PHP &gt;=8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/76faf7e3fa9f40dc9e0a6e9ac0b151b48ec141c58e42bb26b945640be03446e3?d=identicon)[Octfx](/maintainers/Octfx)

---

Top Contributors

[![octfx](https://avatars.githubusercontent.com/u/6594492?v=4)](https://github.com/octfx "octfx (302 commits)")[![Alexia](https://avatars.githubusercontent.com/u/248632?v=4)](https://github.com/Alexia "Alexia (210 commits)")[![translatewiki](https://avatars.githubusercontent.com/u/24829418?v=4)](https://github.com/translatewiki "translatewiki (78 commits)")[![applehat](https://avatars.githubusercontent.com/u/262524?v=4)](https://github.com/applehat "applehat (67 commits)")[![alistair3149](https://avatars.githubusercontent.com/u/9260542?v=4)](https://github.com/alistair3149 "alistair3149 (45 commits)")[![Whiteknight](https://avatars.githubusercontent.com/u/122494?v=4)](https://github.com/Whiteknight "Whiteknight (42 commits)")[![robert-nix](https://avatars.githubusercontent.com/u/892369?v=4)](https://github.com/robert-nix "robert-nix (15 commits)")[![paladox](https://avatars.githubusercontent.com/u/5727000?v=4)](https://github.com/paladox "paladox (8 commits)")[![Sophivorus](https://avatars.githubusercontent.com/u/3542266?v=4)](https://github.com/Sophivorus "Sophivorus (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![drorsnir](https://avatars.githubusercontent.com/u/3416107?v=4)](https://github.com/drorsnir "drorsnir (4 commits)")[![valeryan](https://avatars.githubusercontent.com/u/1508761?v=4)](https://github.com/valeryan "valeryan (4 commits)")[![pcjcos](https://avatars.githubusercontent.com/u/2172365?v=4)](https://github.com/pcjcos "pcjcos (3 commits)")[![kghbln](https://avatars.githubusercontent.com/u/1104078?v=4)](https://github.com/kghbln "kghbln (3 commits)")[![SomeMWDev](https://avatars.githubusercontent.com/u/186634068?v=4)](https://github.com/SomeMWDev "SomeMWDev (3 commits)")[![Aeywoo](https://avatars.githubusercontent.com/u/65846594?v=4)](https://github.com/Aeywoo "Aeywoo (3 commits)")[![hexmode](https://avatars.githubusercontent.com/u/43581?v=4)](https://github.com/hexmode "hexmode (3 commits)")[![townxelliot](https://avatars.githubusercontent.com/u/83619?v=4)](https://github.com/townxelliot "townxelliot (3 commits)")[![mszabo-wikia](https://avatars.githubusercontent.com/u/2721291?v=4)](https://github.com/mszabo-wikia "mszabo-wikia (2 commits)")[![gaon12](https://avatars.githubusercontent.com/u/34927797?v=4)](https://github.com/gaon12 "gaon12 (2 commits)")

---

Tags

mediawikimediawiki-extensionvideoyoutube

### Embed Badge

![Health badge](/badges/starcitizenwiki-embedvideo/health.svg)

```
[![Health](https://phpackages.com/badges/starcitizenwiki-embedvideo/health.svg)](https://phpackages.com/packages/starcitizenwiki-embedvideo)
```

###  Alternatives

[asgardcms/media-module

Media module for AsgardCMS. Handles the media library.

1030.6k2](/packages/asgardcms-media-module)[chkilel/icones-plugin

Access thousands of icons including popular icon sets, icon fonts and several Emoji sets from a backed Form Widget

181.6k](/packages/chkilel-icones-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
