Spaces:
Running
Running
Remove recording functionality, keep only live sound playback
Browse files- index.html +1 -58
index.html
CHANGED
|
@@ -319,38 +319,6 @@
|
|
| 319 |
color: var(--pollen-coral);
|
| 320 |
}
|
| 321 |
|
| 322 |
-
/* Action buttons */
|
| 323 |
-
.action-row {
|
| 324 |
-
display: flex;
|
| 325 |
-
gap: 8px;
|
| 326 |
-
}
|
| 327 |
-
|
| 328 |
-
.action-btn {
|
| 329 |
-
flex: 1;
|
| 330 |
-
padding: 10px;
|
| 331 |
-
background: var(--pollen-darker);
|
| 332 |
-
border: 1px solid var(--pollen-card-light);
|
| 333 |
-
color: var(--text-primary);
|
| 334 |
-
border-radius: 8px;
|
| 335 |
-
cursor: pointer;
|
| 336 |
-
font-size: 0.8em;
|
| 337 |
-
}
|
| 338 |
-
|
| 339 |
-
.action-btn:hover {
|
| 340 |
-
border-color: var(--pollen-coral);
|
| 341 |
-
}
|
| 342 |
-
|
| 343 |
-
.action-btn:disabled {
|
| 344 |
-
opacity: 0.4;
|
| 345 |
-
cursor: not-allowed;
|
| 346 |
-
}
|
| 347 |
-
|
| 348 |
-
.action-btn.recording {
|
| 349 |
-
background: var(--danger);
|
| 350 |
-
border-color: var(--danger);
|
| 351 |
-
animation: blink 1s infinite;
|
| 352 |
-
}
|
| 353 |
-
|
| 354 |
/* Robot Selector */
|
| 355 |
.robot-list {
|
| 356 |
display: flex;
|
|
@@ -419,11 +387,6 @@
|
|
| 419 |
grid-column: 2;
|
| 420 |
grid-row: 3;
|
| 421 |
}
|
| 422 |
-
|
| 423 |
-
.panel:nth-of-type(4) { /* Recording */
|
| 424 |
-
grid-column: 2;
|
| 425 |
-
grid-row: 4;
|
| 426 |
-
}
|
| 427 |
}
|
| 428 |
|
| 429 |
/* Login View */
|
|
@@ -599,16 +562,6 @@
|
|
| 599 |
</div>
|
| 600 |
</div>
|
| 601 |
|
| 602 |
-
<!-- Recording -->
|
| 603 |
-
<div class="panel">
|
| 604 |
-
<div class="panel-header">Recording</div>
|
| 605 |
-
<div class="panel-content">
|
| 606 |
-
<div class="action-row">
|
| 607 |
-
<button class="action-btn" id="btnStartRec" onclick="startRecording()" disabled>Start Rec</button>
|
| 608 |
-
<button class="action-btn" id="btnStopRec" onclick="stopRecording()" disabled>Stop Rec</button>
|
| 609 |
-
</div>
|
| 610 |
-
</div>
|
| 611 |
-
</div>
|
| 612 |
</div>
|
| 613 |
</div>
|
| 614 |
|
|
@@ -642,8 +595,6 @@
|
|
| 642 |
window.stopStream = stopStream;
|
| 643 |
window.playSound = playSound;
|
| 644 |
window.playSoundPreset = playSoundPreset;
|
| 645 |
-
window.startRecording = startRecording;
|
| 646 |
-
window.stopRecording = stopRecording;
|
| 647 |
|
| 648 |
document.addEventListener('DOMContentLoaded', () => {
|
| 649 |
initAuth();
|
|
@@ -931,9 +882,7 @@
|
|
| 931 |
}
|
| 932 |
|
| 933 |
function enableControls(enabled) {
|
| 934 |
-
|
| 935 |
-
document.getElementById(id).disabled = !enabled
|
| 936 |
-
);
|
| 937 |
}
|
| 938 |
|
| 939 |
// ===================== Robot State =====================
|
|
@@ -967,9 +916,6 @@
|
|
| 967 |
document.getElementById('leftAntSlider').value = l;
|
| 968 |
document.getElementById('leftAntValue').textContent = l + '°';
|
| 969 |
}
|
| 970 |
-
if (state.is_recording !== undefined) {
|
| 971 |
-
document.getElementById('btnStartRec').classList.toggle('recording', state.is_recording);
|
| 972 |
-
}
|
| 973 |
}
|
| 974 |
|
| 975 |
// ===================== Head Sliders =====================
|
|
@@ -1076,9 +1022,6 @@
|
|
| 1076 |
document.getElementById('soundInput').value = file;
|
| 1077 |
sendCommand({ play_sound: file });
|
| 1078 |
}
|
| 1079 |
-
|
| 1080 |
-
function startRecording() { sendCommand({ start_recording: true }); }
|
| 1081 |
-
function stopRecording() { sendCommand({ stop_recording: true }); }
|
| 1082 |
</script>
|
| 1083 |
</body>
|
| 1084 |
</html>
|
|
|
|
| 319 |
color: var(--pollen-coral);
|
| 320 |
}
|
| 321 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
/* Robot Selector */
|
| 323 |
.robot-list {
|
| 324 |
display: flex;
|
|
|
|
| 387 |
grid-column: 2;
|
| 388 |
grid-row: 3;
|
| 389 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 390 |
}
|
| 391 |
|
| 392 |
/* Login View */
|
|
|
|
| 562 |
</div>
|
| 563 |
</div>
|
| 564 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 565 |
</div>
|
| 566 |
</div>
|
| 567 |
|
|
|
|
| 595 |
window.stopStream = stopStream;
|
| 596 |
window.playSound = playSound;
|
| 597 |
window.playSoundPreset = playSoundPreset;
|
|
|
|
|
|
|
| 598 |
|
| 599 |
document.addEventListener('DOMContentLoaded', () => {
|
| 600 |
initAuth();
|
|
|
|
| 882 |
}
|
| 883 |
|
| 884 |
function enableControls(enabled) {
|
| 885 |
+
document.getElementById('btnPlaySound').disabled = !enabled;
|
|
|
|
|
|
|
| 886 |
}
|
| 887 |
|
| 888 |
// ===================== Robot State =====================
|
|
|
|
| 916 |
document.getElementById('leftAntSlider').value = l;
|
| 917 |
document.getElementById('leftAntValue').textContent = l + '°';
|
| 918 |
}
|
|
|
|
|
|
|
|
|
|
| 919 |
}
|
| 920 |
|
| 921 |
// ===================== Head Sliders =====================
|
|
|
|
| 1022 |
document.getElementById('soundInput').value = file;
|
| 1023 |
sendCommand({ play_sound: file });
|
| 1024 |
}
|
|
|
|
|
|
|
|
|
|
| 1025 |
</script>
|
| 1026 |
</body>
|
| 1027 |
</html>
|