This repository has been archived on 2023-05-12. You can view files and clone it, but cannot push or open issues or pull requests.
media-host/views/pages/file-types/video.ejs

53 lines
2.4 KiB
Text

<!DOCTYPE html>
<html>
<head>
<title><%= name %> - <%= config["meta"]["name"] %></title>
<%- include("../../partial/html-head")%>
<link href="/css/file.css" rel="stylesheet">
<meta property="og:site_name" content="<%= config.meta.name %>">
<meta name="title" content="<%= name %> on <%= config.meta.name %>">
<meta property="og:title" content="<%= name %> on <%= config.meta.name %>">
<meta property="twitter:title" content="<%= name %> on <%= config.meta.name %>">
<meta name="description" content="A <%= file.humanSize %> <%= file.mime %> file.">
<meta property="og:description" content="A <%= file.humanSize %> <%= file.mime %> file.">
<meta property="twitter:description" content="A <%= file.humanSize %> <%= file.mime %> file.">
<meta name="author" content="<%= uploaderName %>">
<meta property="og:author" content="<%= uploaderName %>">
<meta property="og:type" content="video">
<meta property="og:video" content="http://<%= config.meta.domain %><%= file.direct %>/<%= file.name %>">
<meta property="og:video:url" content="http://<%= config.meta.domain %><%= file.direct %>/<%= file.name %>">
<meta property="og:video:secure_url" content="https://<%= config.meta.domain %><%= file.direct %>/<%= file.name %>">
<meta property="og:video:type" content="<%= file.mime %>">
</head>
<body>
<%- include("../../partial/header") %>
<div class="modal">
<% if (file.mime) { %>
<% if (file.mime == "video/mp4" || file.mime == "video/webm") { %>
<div class="video-player">
<video class="preview" src="<%= file.direct %>" controls></video>
</div>
<% } else if (file.transcodedFile) { %>
<div class="video-player">
<video class="preview" src="<%= file.transcodedFile %>" controls></video>
</div>
<% } else { %>
<div class="err">
<p>This type of video can't be played in a browser. The server may still be remuxing your file, but it is still playable in VLC or similar software by copying the "Raw" link below.</p>
</div>
<% } %>
<% } else { %>
<div class="video-player">
<video class="preview" src="<%= file.direct %>" controls></video>
</div>
<% } %>
<%- include("../../partial/file-metadata-block") %>
</div>
<%- include("../../partial/footer") %>
<script src="/js/date.js"></script>
</body>
</html>