Changes for page Video Macro

Last modified by Ludovic Dubost on 2023/04/25 09:12

From version 2.1
edited by Ludovic Dubost
on 2018/07/01 11:43
Change comment: Install extension [org.xwiki.contrib:macro-video/1.12]
To version 1.1
edited by Ludovic Dubost
on 2017/02/15 10:55
Change comment: Install extension [org.xwiki.contrib:macro-video-1.11]

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -56,18 +56,13 @@
56 56   #if ("$!xcontext.macro.params.attachment" != '')
57 57   ## read a video attachement
58 58   #set($videoAttachmentName = $xcontext.macro.params.attachment)
59 - #set($videoAttachmentDoc = $doc)
60 - #set($videoAttachmentRef = $xcontext.macro.params.reference)
61 - #if("$!videoAttachmentRef" != '' && $services.security.authorization.hasAccess('view', $videoAttachmentRef))
62 - #set($videoAttachmentDoc = $xwiki.getDocument($services.model.resolveDocument($xcontext.macro.params.reference)))
63 - #end
64 - #if ($videoAttachmentDoc.getAttachment($videoAttachmentName))
59 + #if ($doc.getAttachment($videoAttachmentName))
65 65   #set($discard = $xwiki.jsx.use("Macros.Video20"))
66 66   #set($discard = $xwiki.ssx.use("Macros.Video20"))
67 - #set($videoURL = $videoAttachmentDoc.getAttachmentURL($videoAttachmentName))
62 + #set($videoURL = $doc.getAttachmentURL($videoAttachmentName))
68 68   #set($videoPoster = "")
69 - #if("$!xcontext.macro.params.videoPoster" != '' && $videoAttachmentDoc.getAttachment($xcontext.macro.params.videoPoster))
70 - #set($videoPoster = $videoAttachmentDoc.getAttachmentURL($xcontext.macro.params.videoPoster))
64 + #if("$!xcontext.macro.params.videoPoster" != '' && $doc.getAttachment($xcontext.macro.params.videoPoster))
65 + #set($videoPoster = $doc.getAttachmentURL($xcontext.macro.params.videoPoster))
71 71   #end
72 72   #set($supportedVideoFormats = ["mp4", "webm", "ogv", "mov", "avi", "mkv", "flv"])
73 73   #set($videoFormat = "")
XWiki.WikiMacroParameterClass[7]
Parameter description
... ... @@ -1,1 +1,0 @@
1 -Reference of a document in case of a video attachment.
Parameter name
... ... @@ -1,1 +1,0 @@
1 -reference