forked from lucaperret/kap-now
-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.ejs
82 lines (81 loc) · 2.14 KB
/
template.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta property="og:description"
content="Kapture Screen Recording"
/>
<%if (format == 'webm' || format == 'mp4') { %>
<meta property="og:video" content="<%= title %>" />
<link
href="https://unpkg.com/video.js@7/dist/video-js.min.css"
rel="stylesheet"
/>
<!-- City -->
<link
href="https://unpkg.com/@videojs/themes@1/dist/city/index.css"
rel="stylesheet"
/>
<% } else { %>
<meta property="og:image" content="<%= title %>" />
<% } %>
<style>
body {
font-family: 'san-serif';
background: #1E1E1E;
}
main {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
main .video {
height: 432px;
width: 768px;
border: 1px solid #3A3A3A;
}
main .image {
height: 576px;
width: 1024px;
}
main .image img {
max-width: 100%;
max-height: 100%;
display: block;
margin: auto;
}
</style>
<title><%= title %></title>
</head>
<body>
<main>
<%if (format == 'webm' || format == 'mp4') { %>
<div class="video">
<video
id="kapture-video"
class="video-js vjs-fill vjs-theme-city"
controls
preload="auto"
data-setup='{"responsive": true}'
>
<source src="<%= title %>" type="video/<%= format %>" />
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a
web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank"
>supports HTML5 video</a
>
</p>
</video>
</div>
<script src="https://vjs.zencdn.net/7.8.4/video.js"></script>
<% } else { %>
<div class="image">
<img src="<%= title %>" alt="Kapture Screen Recording" />
</div>
<% } %>
</main>
</body>
</html>