-
Notifications
You must be signed in to change notification settings - Fork 26
/
recorder.html
55 lines (52 loc) · 1.47 KB
/
recorder.html
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
<!DOCTYPE html>
<html lang="en">
<style>
video#recordPlayback {
position: absolute;
top: 20px;
max-width: 50%;
height: auto;
z-index: 21;
}
div#recordControls {
position: absolute;
display: inline-flex;
z-index: 20;
top: 0;
left: 25px;
}
.recordBtn:active {
background-color: rgba(255,255,255, 0.4);
border-radius: 4px;
border:1px solid rgba(255,255,255, 0.6);
cursor:pointer;
color: #3c3c3c;
padding:2px 4px;
margin: 2px;
font-weight: bold;
}
.recordBtn:hover {
background-color:rgba(255,255,255, 0.6);
}
.recordBtn:disabled {
position:relative;
top:1px;
background-color:rgba(255,255,255, 0.2);
border:1px solid rgba(255,255,255, 0.3);
color: #9a9a9a;
}
</style>
<div>
<video controls playsinline autoplay hidden id="recordPlayback"></video>
</div>
<!--ToDo: inject mediaRecorder polyfill for Safari-->
<div id="recordControls">
<span id="recordStatus"></span>
<button class="recordBtn" id="recordStart">Record</button>
<button class="recordBtn" id="recordPause" disabled>Pause</button>
<button class="recordBtn" id="recordStop" disabled>Stop</button>
<button class="recordBtn" id="recordPlay" disabled>Play</button>
<button class="recordBtn" id="recordSave" disabled>Save</button>
<script src="static/recorder.js"></script>
</div>
</html>