Wiki source code of Macros
Last modified by RPG Research Xwiki Documents Administrator on 2023/09/27 22:44
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity output="false"}} | ||
| 2 | #* General XWikiTube utilities. *# | ||
| 3 | |||
| 4 | #** | ||
| 5 | * Display video information | ||
| 6 | * @param $video a map containing the video information | ||
| 7 | *# | ||
| 8 | #macro(displayVideoInfo $video) | ||
| 9 | #if ("$!video" != '' && $video.size() > 0) | ||
| 10 | ==== Video information ==== | ||
| 11 | * Name: **$!video.name** | ||
| 12 | * Extension: **$!video.extension** | ||
| 13 | * Mime type: **$!video.mimeType** | ||
| 14 | * Size: **$!video.sizeMB MB** | ||
| 15 | * Duration(HOURS:MM:SS.MICROSECONDS): **$!video.hmsDuration** | ||
| 16 | * Resolution(px): **$!video.resolution** | ||
| 17 | * Bitrate(kbps): **$!video.bitrate** | ||
| 18 | #end | ||
| 19 | #end | ||
| 20 | |||
| 21 | #** | ||
| 22 | * Display video encode form | ||
| 23 | * @param $videoAttachmens list of video attachments | ||
| 24 | *# | ||
| 25 | #macro(displayVideoEncodeForm $videoAttachmens) | ||
| 26 | <div id="video-encode-blk"> | ||
| 27 | <div id="select-video-blk"> | ||
| 28 | <label>Select the video to be encoded</label> | ||
| 29 | <select id="video-select"> | ||
| 30 | #foreach($att in $videoAttachmens) | ||
| 31 | #if($att.getMimeType().contains("video")) | ||
| 32 | <option value="$att.getFilename()">$att.getFilename()</option> | ||
| 33 | #end | ||
| 34 | #end | ||
| 35 | </select> | ||
| 36 | <input type="button" value="Encode" id="encode-video-btn" class="btn btn-primary"/> | ||
| 37 | </div> | ||
| 38 | <div id="encoding-progress" style="display: none;"> <span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span> Initialization ...</div> | ||
| 39 | </div> | ||
| 40 | #end | ||
| 41 | {{/velocity}} |