-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
46 lines (46 loc) · 1015 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Screenshot Example</title>
<meta charset="UTF-8">
<script src="screenshot.js"></script>
<style>
img {
border: red 2px solid;
display: block;
margin: 20px;
}
#screenshots {
width: 500px;
min-height: 400px;
border: 1px solid black;
}
</style>
</head>
<body>
<h1>Screenshot Example</h1>
<p><button id="button">
Take Screenshot
</button></p>
<h2>Screenshots:</h2>
<div id="screenshots"></div>
<script>
document.getElementById('button').addEventListener('click', () => {
new Screenshot({
success: img => {
document.getElementById('screenshots').append(img);
},
noPermit: () => {
alert('Please Allow!');
},
noSupport: () => {
alert("You're browser not support screen share");
},
sound: true,
width: 200,
askNewShare: true,
});
});
</script>
</body>
</html>