gifv support?
This commit is contained in:
parent
cfb29c8598
commit
f4acf57fde
5 changed files with 59 additions and 2 deletions
14
views/gifv.ejs
Normal file
14
views/gifv.ejs
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta property="og:type" content="video.other">
|
||||
<meta property="twitter:player" content="<%= url %>">
|
||||
<meta property="og:video:type" content="text/html">
|
||||
<!--<meta property="og:video:width" content="<%# width %>">
|
||||
<meta property="og:video:height" content="<%# height %>">
|
||||
<meta name="twitter:image" content="<%# thumbnail %>">-->
|
||||
</head>
|
||||
<body>
|
||||
<video autoplay loop muted playsinline class="image" src="<%= url %>" width="100%"></video>
|
||||
</body>
|
||||
</html>
|
|
@ -49,7 +49,13 @@ return string.slice((string.lastIndexOf(".") - 2 >>> 0) + 2);
|
|||
<form action="<%= file.url %>" method="post">
|
||||
<div class="view">
|
||||
<% if (extension(file.path) == ".mp4" || extension(file.path) == ".mov" || extension(file.path) == "webp") { %>
|
||||
<video autoplay loop muted playsinline class="image" src="/uploads/<%=file.path %>" width="100%" onclick="copyURI(event)"></video>
|
||||
<div class="video">
|
||||
<video class="image" autoplay loop muted playsinline>
|
||||
<source src="/uploads/<%= file.path %>">
|
||||
</video>
|
||||
<div class="overlay">
|
||||
<a href="/gifv/<%=file.path %>" onclick="copyA(event)">Copy as GIFv</a>
|
||||
</div>
|
||||
<% } else if (extension(file.path) == ".jpg" || extension(file.path) == ".jpeg" || extension(file.path) == ".png" || extension(file.path) == ".gif" || extension(file.path) == ".webp" ) { %>
|
||||
<img class="image" src="/uploads/<%=file.path %>" width="100%" onclick="copyURI(event)">
|
||||
<% } else {%> <!-- non-media file -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue