Repository navigation
Expand file tree
/
Copy pathScreenTools.html
More file actions
147 lines (134 loc) · 4.17 KB
/
Copy pathScreenTools.html
File metadata and controls
147 lines (134 loc) · 4.17 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Record your screen with audio, pause/resume recording, and export in HD MP4. Free online screen recorder with impressive UI and animations." />
<meta name="keywords" content="screen recorder, online screen recorder, record screen with audio, mp4 screen recorder, screen capture tool" />
<meta name="author" content="Your Name" />
<title>Screen Recorder - Record Screen with Voice in HD</title>
<style>
body {
margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
color: white;
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}
header {
text-align: center;
animation: fadeInDown 1s ease-in-out;
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.controls {
margin: 20px;
display: flex;
gap: 10px;
}
button {
padding: 10px 20px;
border: none;
border-radius: 8px;
background-color: #1abc9c;
color: white;
cursor: pointer;
transition: transform 0.3s ease;
}
button:hover {
transform: scale(1.05);
}
.ad-space {
margin-top: 30px;
width: 100%;
max-width: 728px;
height: 90px;
background-color: #333;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10px;
}
video {
margin-top: 20px;
width: 100%;
max-width: 800px;
border-radius: 10px;
}
</style>
</head>
<body>
<header>
<h1>🎥 Screen Recorder Tool</h1>
<p>Record your screen with voice in HD. Simple, powerful, free!</p>
</header>
<div class="controls">
<button onclick="startRecording()">Start Recording</button>
<button onclick="pauseRecording()">Pause</button>
<button onclick="resumeRecording()">Resume</button>
<button onclick="stopRecording()">Stop & Download</button>
</div>
<video id="preview" autoplay muted></video>
<div class="ad-space">
<!-- Google AdSense Placeholder -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="1234567890"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
<script>
let mediaRecorder;
let recordedChunks = [];
let stream;
async function startRecording() {
stream = await navigator.mediaDevices.getDisplayMedia({ video: true, audio: true });
const audioStream = await navigator.mediaDevices.getUserMedia({ audio: true });
const combined = new MediaStream([...stream.getVideoTracks(), ...audioStream.getAudioTracks()]);
document.getElementById('preview').srcObject = combined;
recordedChunks = [];
mediaRecorder = new MediaRecorder(combined);
mediaRecorder.ondataavailable = event => {
if (event.data.size > 0) recordedChunks.push(event.data);
};
mediaRecorder.onstop = () => {
const blob = new Blob(recordedChunks, { type: 'video/mp4' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'recording.mp4';
a.click();
};
mediaRecorder.start();
}
function pauseRecording() {
if (mediaRecorder && mediaRecorder.state === 'recording') {
mediaRecorder.pause();
}
}
function resumeRecording() {
if (mediaRecorder && mediaRecorder.state === 'paused') {
mediaRecorder.resume();
}
}
function stopRecording() {
if (mediaRecorder && mediaRecorder.state !== 'inactive') {
mediaRecorder.stop();
stream.getTracks().forEach(track => track.stop());
}
}
</script>
</body>
</html>