filesHtml.append("<a href=\""
+ indexingContext.getGlobalUrl()
+ UrlParamEncoder.encode(indexingContext.getLocalUrl() + "/"
- + file.fileName) + "\">download as OGV</a>");
+ + file.fileName) + "\">download as OGV file</a>");
filesHtml.append("</div>\n");
return html.toString();
}
+ @Override
+ public void enlistWebm(AbstractFile abstractFile,
+ DirectoryMetadata directory) {
+ final GeneralFile file = (GeneralFile) abstractFile;
+
+ filesHtml.append("<div style=\"margin: 30px; clear: both;\">");
+
+ // watchable video
+
+ String fileUrl = indexingContext.getGlobalUrl()
+ + UrlParamEncoder.encode(indexingContext.getLocalUrl() + "/"
+ + file.fileName);
+
+ filesHtml.append("<video controls>\n");
+ filesHtml.append(" <source src=\"" + fileUrl
+ + "\" type='video/webm;codecs=\"vp8, opus\"'/>\n");
+ filesHtml.append("</video>\n");
+ filesHtml.append("<br/>\n");
+
+ // video title
+ filesHtml
+ .append("Video: <b>"
+ + FilePathParser
+ .getFileNameWithoutExtension(file.fileName)
+ + "<b/> ");
+
+ // video download link
+ filesHtml.append("<a href=\""
+ + indexingContext.getGlobalUrl()
+ + UrlParamEncoder.encode(indexingContext.getLocalUrl() + "/"
+ + file.fileName) + "\">download as WebM file</a>");
+
+ filesHtml.append("</div>\n");
+
+ filesHtml.append("\n");
+ }
}