XWikiTubeCode

De SupraWiki
Revisão de 15h31min de 1 de junho de 2023 por Administrator (discussão | contribs) (Importacão de dados via API)
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)

Predefinição:Velocity

  • This page is used to list all added videos
    1. Globals
  1. set($discard = $xwiki.ssx.use("XWikiTubeCode.WebHome"))
  2. set($discard = $xwiki.jsx.use("XWikiTubeCode.WebHome"))
  3. set($videoUploader = $xwiki.parseGroovyFromPage("XWikiTubeCode.VideoUploadGroovy"))
  4. set($discard = $videoUploader.init($xwiki, $xcontext, $services))
    1. Check FFmpeg installation
  5. set($ffmpeg = $videoUploader.mediaTranscoder.checkFFmpeg())
  6. set($liveTableSourceURL = $xwiki.getURL('XWikiTubeCode.VideoUpload','view','xpage=plain&outputSyntax=plain&action=getXWikiTubeVideos'))
  7. set($columns = ["name", "extension", "mimeType", "size", "duration", "resolution", "creator", "creationDate", "encoded", "actions"])
  8. set($columnsProperties = {
   "name" : { "type" : "text", "sortable":false, "filterable":true},
   "extension" : { "type" : "text", "sortable":false, "filterable":false},
   "mimeType" : { "type" : "text", "sortable":false, "filterable":false},
   "size" : { "type" : "text", "sortable":false, "filterable":false},
   "duration" : { "type" : "text", "sortable":false, "filterable":false},
   "resolution" : { "type" : "text", "sortable":false, "filterable":false},
   "creator" : { "type" : "text", "sortable":false, "filterable":false},
   "creationDate" : { "type" : "text", "sortable":false, "filterable":false},
   "encoded" : { "type" : "text", "sortable":false, "filterable":false},
   "actions" : {"type" : "none", "link" : "none", "html" : "true", "sortable":false}

})

  1. set($options = {
  "url":"$liveTableSourceURL",
  "rowCount": 10

})

  1. if(!$ffmpeg)
Predefinição:WarningFFmpeg library is not installed on your server. FFmpeg is required to encode videos.Predefinição:/warning
  1. end
  1. livetable("medias" $columns $columnsProperties $options)

Predefinição:/velocity