Video Macro

Last modified by Admin on 2022/08/01 00:07

cogDisplays videos from YouTube, Dailymotion, Vimeo, attachement videos and DASH videos
Developed by

Oana Tabaranu, Sergiu Dumitriu, Ludovic Dubost, Vincent Massol, Yann Flory, Mohamed Boussaa

Active Installs344
3 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


The Video Macro displays videos from YouTube, Dailymotion, Vimeo and plays a video attached to your wiki page using Video.js library. mp4, webm and ogv formats are supported.

The Video Macro can also play attached videos using Dynamic Adaptive Streaming over HTTP (DASH) technique.
You can create DASH videos in your wiki using the XWikiTube extension. Find more details here: XWikiTube application


Play a video online:

{{video url="<URL>"/}}

Play a video in an attachment:

{{video attachment="<filename>"/}}

Play a Dynamic Adaptive Streaming over HTTP video (DASH).

{{video dash="<Space.Page>"/}}

Parameters definition

urlStringThe URL of your video's page. It has to be the address of a Google video, a YouTube video (including shorten URLs), a Vimeo video or a Dailymotion or Dailymotion Cloud video taken from its original page.
widthNumberThe width of the embedded video, in percentages. By default a size of 100% is used.
heightNumberThe height of the embedded video, in pixels. By default a height of 400 pixels is used.
referenceStringThe name of the entity to consider in case of an attachment video. See the Model module to understand the concept of references. Available since XWiki 3.4M1.
attachmentStringThe name of the video attachment.
dashStringThe document in which the manifest.mpd file and the video streams are attached.
videoPosterStringThe poster of the video is an image attachment that will be displayed before starting playing the video.
ratioStringPossible values: '1:1', '4:3', '16:9' and '21:9'. When this parameter is provided, the width and height are reset to 100% and the video is fit in the parent container. Available since version 1.13 of the macro. 

Sample Code

{{video url="" width="660" height="440"/}}
{{video url="" ratio="16:9"/}}
{{video url="" /}}
{{video url="" /}}
{{video url=""/}}
{{video url="" /}}
{{video url=""/}}
{{video attachment="my-video.mp4" reference="page1.page2.WebHome"/}}
{{video attachment="my-video.webm" videoPoster="poster.jpg"/}}
{{video dash="Videos.MyVideo"/}}


YouTube video


Vimeo video


Dailymotion video


Attachment video


Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Call the macro using the wiki editor (use {{video url="URL"/}} syntax ) or the Wysiwyg editor ( choose Macro>Insert Macro... from the menu and then Video from the list of macros).

Release Notes









No changes!





Dependencies for this extension (org.xwiki.contrib:macro-video 1.14.1):

Get Connected