-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented a simple voice recorder.
- Loading branch information
1 parent
755848a
commit 2463522
Showing
9 changed files
with
671 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
background-color: #f5f5f5; | ||
color: #333; | ||
line-height: 1.6; | ||
padding-top: 60px; | ||
} | ||
|
||
.navbar-brand a:hover { | ||
opacity: 0.8; | ||
} | ||
|
||
.recorder-container { | ||
max-width: 600px; | ||
margin: 2rem auto; | ||
padding: 2rem; | ||
background-color: white; | ||
border-radius: 8px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
h1 { | ||
text-align: center; | ||
margin-bottom: 2rem; | ||
color: #2c3e50; | ||
} | ||
|
||
.recorder-controls { | ||
display: flex; | ||
justify-content: center; | ||
gap: 1rem; | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.control-button { | ||
padding: 0.8rem 1.5rem; | ||
border: none; | ||
border-radius: 25px; | ||
background-color: #3498db; | ||
color: white; | ||
cursor: pointer; | ||
font-size: 1rem; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
#stopButton:not(:disabled) { | ||
background-color: #e74c3c; | ||
} | ||
|
||
#stopButton:not(:disabled):hover { | ||
background-color: #c0392b; | ||
} | ||
|
||
.control-button:disabled { | ||
background-color: #bdc3c7; | ||
cursor: not-allowed; | ||
} | ||
|
||
.control-button:not(:disabled):hover { | ||
background-color: #2980b9; | ||
} | ||
|
||
#recordButton:not(:disabled):hover { | ||
background-color: #2980b9; | ||
} | ||
|
||
.recording-status { | ||
text-align: center; | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.recording-time { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
color: #e74c3c; | ||
margin-top: 0.5rem; | ||
} | ||
|
||
.recordings-list { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.recording-item { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 1rem; | ||
background-color: #f8f9fa; | ||
border-radius: 6px; | ||
border: 1px solid #dee2e6; | ||
} | ||
|
||
.recording-item audio { | ||
max-width: 70%; | ||
} | ||
|
||
.download-button { | ||
padding: 0.5rem 1rem; | ||
background-color: #2ecc71; | ||
color: white; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.download-button:hover { | ||
background-color: #27ae60; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!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="A simple voice recorder and player"> | ||
<meta name="author" content="Amit Merchant"> | ||
<title>Voice Recorder | notepad.js.org</title> | ||
<meta name="keywords" content="voice,recorder,player,notepad" /> | ||
<meta name="application-name" content="Voice Recorder" /> | ||
|
||
<meta property="og:title" content="Voice Recorder | notepad.js.org" /> | ||
<meta property="og:type" content="article" /> | ||
<meta property="og:url" content="http://notepad.js.org/voice-recorder" /> | ||
<meta property="og:description" content="A simple voice recorder and player" /> | ||
<meta property="og:image" content="https://notepad.js.org/art/voice-recorder-notepad.png" /> | ||
|
||
<meta name="twitter:card" content="summary" /> | ||
<meta name="twitter:title" content="Voice Recorder | notepad.js.org" /> | ||
<meta name="twitter:description" content="A simple voice recorder and player" /> | ||
<meta property="twitter:image" content="https://notepad.js.org/art/voice-recorder-notepad.png" /> | ||
|
||
<link href="css/bootstrap.min.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="css/style.css"> | ||
<script src="js/libs/lame.min.js"></script> | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-dark bg-dark fixed-top"> | ||
<div class="container-fluid"> | ||
<div class="navbar-brand"> | ||
<a href="/" class="text-white text-decoration-none">Notepad</a> | ||
<span class="text-white">/</span> | ||
<span class="text-white">Voice Recorder</span> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<div class="recorder-container mt-5 pt-4"> | ||
<h1>Voice Recorder</h1> | ||
<div class="recorder-controls"> | ||
<button id="recordButton" class="control-button"> | ||
<span>Record</span> | ||
</button> | ||
<button id="stopButton" class="control-button" disabled> | ||
<span>Stop</span> | ||
</button> | ||
</div> | ||
<div class="recording-status"> | ||
<span id="recordingStatus"></span> | ||
<div id="recordingTime" class="recording-time">00:00</div> | ||
</div> | ||
<div id="recordings" class="recordings-list"> | ||
<!-- Recorded audio items will be added here --> | ||
</div> | ||
</div> | ||
|
||
<script src="js/libs/bootstrap.bundle.min.js"></script> | ||
<script src="recorder.js"></script> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.