Last modified by Yana Oksner on 2025/10/02 15:36

From version 5.1
edited by Yana Oksner
on 2025/07/18 12:19
Change comment: Migrated property [order] from class [XWiki.WikiMacroParameterClass]
To version 6.1
edited by Yana Oksner
on 2025/10/02 15:36
Change comment: Install extension [com.xwiki.pro:xwiki-pro-macros-confluence-bridges-ui/1.28.0]

Summary

Details

Page properties
Content
... ... @@ -1,6 +1,6 @@
1 1  = Description =
2 2  
3 -This is a bridge for the Confluence Multimedia macro. It uses the [[JW Player>>https://www.jwplayer.com/]] open-source embeddable media player for web sites, supporting many commonly-used audio and video formats.
3 +This is a bridge for the Confluence Multimedia macro. It uses the Video.js open-source embeddable media player for web sites, supporting many commonly-used audio and video formats.
4 4  
5 5  = Parameters =
6 6  
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -5,16 +5,13 @@
5 5   #set ($attachment = $wikimacro.parameters.get('name'))
6 6   #end
7 7   #if ($attachment)
8 - #set ($page = $services.model.resolveDocument($wikimacro.parameters.get('page')))
8 + #set ($page = $services.rendering.escape($wikimacro.parameters.get('page'), $xwiki.currentContentSyntaxId))
9 9   #set ($width = $services.rendering.escape($wikimacro.parameters.get('width'), $xwiki.currentContentSyntaxId))
10 10   #set ($height = $services.rendering.escape($wikimacro.parameters.get('height'), $xwiki.currentContentSyntaxId))
11 + #set ($attachment = $services.rendering.escape($attachment, $xwiki.currentContentSyntaxId))
12 + ## Embed does not yet support autoplay.
11 11   #set ($autostart = "$!wikimacro.parameters.get('autostart').toLowerCase()" == 'true')
12 - #if ("$!page" != '')
13 - #set ($attachRef = $services.model.createAttachmentReference($page, $attachment))
14 - #set ($attachment = $services.model.serialize($attachRef, 'local'))
15 - #end
16 - {{jwplayer attachment="${services.rendering.escape($attachment, $xwiki.currentContentSyntaxId)}" width="$!{width}"
17 - height="$!{height}" autostart="$!{autostart}" /}}
14 + {{embed attachment="$!attachment" width="$!width" height="$!height" reference="$!page" /}}
18 18   #else
19 19   Please provide the filename of the media to play in the name parameter.
20 20   #end