0 Votes

Wiki source code of XWikiTube home

Last modified by Ryan C on 2025/03/07 23:43

Show last authors
1 {{velocity}}
2 #**
3 * This page is used to list all added videos
4 *#
5
6 ## Globals
7 #set($discard = $xwiki.ssx.use("XWikiTubeCode.WebHome"))
8 #set($discard = $xwiki.jsx.use("XWikiTubeCode.WebHome"))
9 #set($videoUploader = $xwiki.parseGroovyFromPage("XWikiTubeCode.VideoUploadGroovy"))
10 #set($discard = $videoUploader.init($xwiki, $xcontext, $services))
11 ## Check FFmpeg installation
12 #set($ffmpeg = $videoUploader.mediaTranscoder.checkFFmpeg())
13 #set($liveTableSourceURL = $xwiki.getURL('XWikiTubeCode.VideoUpload','view','xpage=plain&outputSyntax=plain&action=getXWikiTubeVideos'))
14 #set($columns = ["name", "extension", "mimeType", "size", "duration", "resolution", "creator", "creationDate", "encoded", "actions"])
15 #set($columnsProperties = {
16 "name" : { "type" : "text", "sortable":false, "filterable":true},
17 "extension" : { "type" : "text", "sortable":false, "filterable":false},
18 "mimeType" : { "type" : "text", "sortable":false, "filterable":false},
19 "size" : { "type" : "text", "sortable":false, "filterable":false},
20 "duration" : { "type" : "text", "sortable":false, "filterable":false},
21 "resolution" : { "type" : "text", "sortable":false, "filterable":false},
22 "creator" : { "type" : "text", "sortable":false, "filterable":false},
23 "creationDate" : { "type" : "text", "sortable":false, "filterable":false},
24 "encoded" : { "type" : "text", "sortable":false, "filterable":false},
25 "actions" : {"type" : "none", "link" : "none", "html" : "true", "sortable":false}
26 })
27 #set($options = {
28 "url":"$liveTableSourceURL",
29 "rowCount": 10
30 })
31 #if(!$ffmpeg)
32 {{warning}}FFmpeg library is not installed on your server. FFmpeg is required to encode videos.{{/warning}}
33 #end
34
35 #livetable("medias" $columns $columnsProperties $options)
36 {{/velocity}}