mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-05 14:00:31 +02:00
mic
This commit is contained in:
parent
eb2229631a
commit
b5d4387c95
3 changed files with 9 additions and 10 deletions
|
@ -9,7 +9,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>Microphone Test</h1>
|
||||
<div class="shadow card">
|
||||
<div class="shadow cards">
|
||||
<canvas id="visualizer"></canvas>
|
||||
<button id="btn">Start Listening</button>
|
||||
</div>
|
||||
|
|
|
@ -35,11 +35,11 @@ function draw() {
|
|||
|
||||
analyser.getByteTimeDomainData(dataArray);
|
||||
|
||||
ctx.fillStyle = '#fff';
|
||||
ctx.fillStyle = '#313244';
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = '#000';
|
||||
ctx.strokeStyle = '#fff';
|
||||
ctx.beginPath();
|
||||
|
||||
const sliceWidth = canvas.width / dataArray.length;
|
||||
|
|
|
@ -2,24 +2,23 @@
|
|||
|
||||
canvas {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
background-color: var(--surface0);
|
||||
border-radius: 10px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
background-color: #2a2a2a;
|
||||
background-color: var(--surface0);
|
||||
padding: 7px;
|
||||
color: #c0c0c0;
|
||||
border: #2c2c2c solid 2px;
|
||||
color: var(--text);
|
||||
border: var(--surface2) solid 2px;
|
||||
border-radius: 4px;
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #2c2c2c;
|
||||
color: #d0d0d0;
|
||||
border: #2e2e2e solid 2px;
|
||||
background-color: var(--surface1);
|
||||
border: var(--surface2) solid 2px;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue