Änderungen von Dokument Embed content Macro

Zuletzt geändert von xwikiadmin am 2025/12/11 07:47

Von Version 3.1
bearbeitet von xwikiadmin
am 2025/12/11 07:47
Änderungskommentar: Install extension [org.xwiki.contrib.embed:embed-macro-ui/1.1.3]
Auf Version 2.1
bearbeitet von xwikiadmin
am 2025/12/11 06:30
Änderungskommentar: Migrated property [executionIsolated] from class [XWiki.WikiMacroClass]

Zusammenfassung

Details

Seiteneigenschaften
Inhalt
... ... @@ -38,12 +38,6 @@
38 38  
39 39  {{embed attachment="test-vid.webm"/}}
40 40  
41 -{{code}}
42 -{{embed attachment="test-vid.webm" videoPoster="video_poster.png"/}}
43 -{{/code}}
44 -
45 -{{embed attachment="test-vid.webm" videoPoster="video_poster.png"/}}
46 -
47 47  == DASH ==
48 48  
49 49  {{code}}
video_poster.png
Author
... ... @@ -1,1 +1,0 @@
1 -xwiki:XWiki.xwikiadmin
Größe
... ... @@ -1,1 +1,0 @@
1 -82.8 KB
Inhalt
XWiki.StyleSheetExtension[0]
Code
... ... @@ -1,11 +1,11 @@
1 -#set($videojsURL = $services.webjars.url('video-js/8.17.4/'))
1 +#set($videojsURL = $services.webjars.url('video-js/4.11.4/'))
2 2  @font-face{
3 3   font-family: 'VideoJS';
4 4   src: url('${videojsURL}font/vjs.eot');
5 5   src: url('${videojsURL}font/vjs.eot?#iefix') format('embedded-opentype'),
6 - url('${videojsURL}font/VideoJS.woff') format('woff'),
7 - url('${videojsURL}font/VideoJS.ttf') format('truetype'),
8 - url('${videojsURL}font/VideoJS.svg#icomoon') format('svg');
6 + url('${videojsURL}font/vjs.woff') format('woff'),
7 + url('${videojsURL}font/vjs.ttf') format('truetype'),
8 + url('${videojsURL}font/vjs.svg#icomoon') format('svg');
9 9   font-weight: normal;
10 10   font-style: normal;
11 11  }
XWiki.WikiMacroClass[0]
Makro-Code
... ... @@ -15,10 +15,9 @@
15 15   #end
16 16   #if ($videoAttachmentDoc.getAttachment($videoAttachmentName))
17 17   #set ($videoURL = $videoAttachmentDoc.getAttachmentURL($videoAttachmentName))
18 - #set ($videoPosterParam = '')
18 + #set ($videoPoster = '')
19 19   #if ($videoAttachmentDoc.getAttachment($xcontext.macro.params.videoPoster))
20 20   #set ($videoPoster = $videoAttachmentDoc.getAttachmentURL($xcontext.macro.params.videoPoster))
21 - #set ($videoPosterParam = " poster=${escapetool.q}$escapetool.xml(${videoPoster})${escapetool.q}")
22 22   #end
23 23   #set ($supportedVideoFormats = ['mp4', 'webm', 'ogv', 'mov', 'avi', 'mkv', 'flv'])
24 24   #set ($formatIndex = $videoAttachmentName.lastIndexOf('.'))
... ... @@ -43,8 +43,8 @@
43 43   {{html clean="false"}}
44 44   <div $!embedContainerClass>
45 45   <video class="video-js vjs-default-skin vjs-big-play-centered $!embedItemClass" controls preload="auto"
46 - width="$widthParam" height="$heightParam" $videoPosterParam data-setup=''>
47 - <source src="$escapetool.xml($!videoURL)" type="video/$escapetool.xml($!videoMimeType)" />
45 + width="$widthParam" height="$heightParam" poster="$!videoPoster" data-setup=''>
46 + <source src="$!videoURL" type="video/$!videoMimeType" />
48 48   </video>
49 49   </div>
50 50   {{/html}}
... ... @@ -71,7 +71,7 @@
71 71   {{html clean="false"}}
72 72   <div $!embedContainerClass>
73 73   <video class="dashvideo video-js vjs-default-skin $!embedItemClass" controls preload="auto" width="$widthParam" height="$heightParam">
74 - <source src="$escapetool.xml($!manifestFileURL)" type="application/dash+xml">
73 + <source src="$!manifestFileURL" type="application/dash+xml">
75 75   </video>
76 76   </div>
77 77   {{/html}}
... ... @@ -312,7 +312,7 @@
312 312  {{/velocity}}
313 313  
314 314  {{velocity output="false"}}
315 -#set ($widthParam = $escapetool.xml($wikimacro.parameters.width))
314 +#set ($widthParam = $escapetool.xml($wikimacro.parameters.widht))
316 316  #set ($heightParam = $escapetool.xml($wikimacro.parameters.height))
317 317  #set ($embedContainerClass = '')
318 318  #set ($embedItemClass = '')
... ... @@ -320,7 +320,7 @@
320 320  ## The ratio value is used to compute a bootstrap css class: embed-responsive-16by9.
321 321  #if ($xcontext.macro.params.ratio)
322 322   #set ($ratio = $xcontext.macro.params.ratio.replace(':', 'by'))
323 - #set ($embedContainerClass = " class='embed-responsive embed-responsive-$escapetool.xml($ratio)'")
322 + #set ($embedContainerClass = " class='embed-responsive embed-responsive-$ratio'")
324 324   #set ($embedItemClass = 'embed-responsive-item')
325 325  #end
326 326  {{/velocity}}
Default categories
... ... @@ -1,1 +1,0 @@
1 -Content
Standardkategorie
... ... @@ -1,0 +1,1 @@
1 +Content
Makrobeschreibung
... ... @@ -1,0 +1,20 @@
1 +Show in your wiki page many external content. Currently this support theses external services:
2 +* Youtube
3 +* Dailymotion
4 +* Vimeo
5 +* x.com
6 +* Google doc, sheets and slides
7 +* Google calendar
8 +* Google maps
9 +* Facebook
10 +* Linkedin
11 +* Figma
12 +* Spotify
13 +* Prezi
14 +* Flickr
15 +* Viddler
16 +* Aha! roadmaps
17 +
18 +Also play a video attached to your wiki page using Video.js library. mp4, webm and ogv formats are supported.
19 +
20 +The video macro can also plays a DASH video (Dynamic Adaptive Streaming over HTTP).
Makroname
... ... @@ -1,0 +1,1 @@
1 +Embed content
XWiki.WikiMacroParameterClass[0]
Parameter-Beschreibung
... ... @@ -1,0 +1,1 @@
1 +The URL of the video you want to display on your page (Vimeo, Youtube, Daily Motion or Google Video only).
XWiki.WikiMacroParameterClass[1]
Parameter-Beschreibung
... ... @@ -1,0 +1,1 @@
1 +The width of the embedded video, in pixels.
XWiki.WikiMacroParameterClass[2]
Parameter-Beschreibung
... ... @@ -1,0 +1,1 @@
1 +The height of the embedded video, in pixels. By default a height of 400 pixels is used.
XWiki.WikiMacroParameterClass[3]
Parameter-Beschreibung
... ... @@ -1,0 +1,1 @@
1 +The name of the video attachment.
XWiki.WikiMacroParameterClass[5]
Parameter-Beschreibung
... ... @@ -1,0 +1,1 @@
1 +The poster of the video is an image attachment that will be displayed before starting playing the video.
XWiki.WikiMacroParameterClass[6]
Parameter-Beschreibung
... ... @@ -1,0 +1,1 @@
1 +The document in which the manifest.mpd file and the video streams are attached.
Parameter-Typ
... ... @@ -1,1 +1,0 @@
1 -org.xwiki.model.reference.DocumentReference
XWiki.WikiMacroParameterClass[7]
Parameter-Typ
... ... @@ -1,1 +1,0 @@
1 -org.xwiki.model.reference.DocumentReference