Multimedia Macro
The multimedia macro is used to embed attached video, animation and other multimedia files on a Confluence page.
Confluence supports the following multimedia formats:
- Adobe Flash (.swf)
- Apple QuickTime (.mov)
- Windows Media (.wma, .wmv)
- Real Media (.rm, .ram)
- MP3 and MP4 files (.mp3, .mp4)
- MPEG files (.mpeg, .mpg)
- AVI files (.avi) You may need to enable an avi decoder within your browser.
See the Widget Connector Macro if you want to display online multimedia content, such as YouTube and Vimeo videos on a page.
To add the Multimedia macro to a page:
- In the Confluence editor, choose Insert > Other Macros
- Find and select the required macro
Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.
To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.
You can also drag a supported multimedia file directly on to the page. Confluence will attach the file and add the macro for you.
Parameters
Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Parameter name | Required | Default | Parameter description and accepted values |
---|---|---|---|
Page Name
| Yes | Current page | Name of the page to which the multimedia file is attached. Start typing the name of the page and then select it from list of suggested pages. Include the spacekey if you want to specify a page in another space (for example |
Attachment
| Yes | None | File name of the attached multimedia file. |
Width | No | If not specified, the browser will determine the width based on the file type. | Width of the movie window to be displayed on the page. By default, this value is specified in pixels. You can also choose to specify a percentage of the window's width, or any other value accepted by HTML. |
Height | No | If not specified, the browser will determine the height based on the file type. | Height of the movie window to be displayed on the page. By default, this value is specified in pixels. You can also choose to specify a percentage of the window's height, or any other value accepted by HTML. |
Autoplay
| No |
| If the parameter is set to |
Code examples
The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page.
Macro name: multimedia
Macro body: None.
Storage format example
<ac:structured-macro ac:name="multimedia">
<ac:parameter ac:name="width">500</ac:parameter>
<ac:parameter ac:name="name">
<ri:attachment ri:filename="Ninjas.MOV"/>
</ac:parameter>
</ac:structured-macro>
Wikimarkup example
{multimedia:space=DOC|page=My macros|name=ninjas.swf|autostart=true}
Notes
- You will need the relevant multimedia plugin for your browser. Your browser may need a plugin to play the video or audio file on a Confluence page.
- Autoplay may not always work as expected. Some browsers may not autoplay the attached file.
- If you get the error, 'Unable to embed content of type application/octet-stream', this means the MIME type is not recognised.
Advanced users can try styling via CSS. By default, each embedded object is wrapped in a
div
tag. If you wish to style thediv
and its contents, override theembeddedObject
CSS class. Specifying an ID as a property also allows you to style different embedded objects differently. CSS class names in the formatembeddedObject-ID
are used.