feat: enhance audio visualization and server management for improved … · msitarzewski/openstudio@ddd4502 · GitHub
Skip to content

Commit ddd4502

Browse files
committed
feat: enhance audio visualization and server management for improved user experience
- Implemented per-participant level meters for real-time microphone visualization, enhancing audio feedback during sessions. - Addressed Safari WebAudio quirks by ensuring AudioContext resumes correctly after permission dialogs and preventing auto-suspension with ultra-low gain settings. - Expanded the `dev.sh` script to include comprehensive commands for managing OpenStudio services, including start, stop, restart, status, and logs. - Updated documentation in `README.md` to reflect new server management features and troubleshooting steps, ensuring users have clear guidance on the development workflow. This commit significantly improves the user experience by providing visual feedback for audio levels and streamlining server management processes.
1 parent d49a363 commit ddd4502

13 files changed

Lines changed: 1080 additions & 311 deletions

File tree

‎.claude/settings.local.json‎

Lines changed: 3 additions & 1 deletion

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
140140
- Mesh network topology limits practical participant count to 10-15
141141
- Self-mute has architectural limitation (requires microphone track muting, not yet implemented)
142142
- Icecast credentials hard-coded (acceptable for localhost, needs server-side auth for production)
143+
- Safari WebAudio quirks: Requires AudioContext.resume() after permission dialog, zero-gain causes suspension (workaround implemented)
143144
- Manual testing pending for Tasks 016/017/018/019 (automated infrastructure complete)
144145
- No DHT station directory yet (planned for Release 0.2)
145146
- No waiting room/call screening (planned for Release 0.3)

‎QUICKSTART.md‎

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# OpenStudio Quick Start
2+
3+
## First Time Setup (5 minutes)
4+
5+
```bash
6+
git clone https://github.com/msitarzewski/openstudio.git
7+
cd openstudio
8+
cp .env.example .env
9+
cd server && npm install && cd ..
10+
cd web && npm install && cd ..
11+
cp station-manifest.sample.json station-manifest.json
12+
```
13+
14+
## Daily Development Workflow
15+
16+
### Start Services
17+
```bash
18+
./dev.sh start # Start all services
19+
cd web && python3 -m http.server 8086 # In another terminal
20+
```
21+
22+
Open browser: **http://localhost:8086**
23+
24+
### Server Management Cheat Sheet
25+
26+
| Command | Description |
27+
|---------|-------------|
28+
| `./dev.sh start` | Start all services (default) |
29+
| `./dev.sh stop` | Stop all services |
30+
| `./dev.sh restart` | Restart after code changes |
31+
| `./dev.sh status` | Check health + service status |
32+
| `./dev.sh logs` | Follow all logs (Ctrl+C to exit) |
33+
| `./dev.sh logs signaling` | Follow signaling server logs only |
34+
| `./dev.sh help` | Show all commands |
35+
36+
### Common Tasks
37+
38+
**After making code changes**:
39+
```bash
40+
./dev.sh restart
41+
./dev.sh logs signaling # Verify no errors
42+
```
43+
44+
**Check if everything is running**:
45+
```bash
46+
./dev.sh status
47+
# Should show:
48+
# ✅ Signaling (6736): OK
49+
# ✅ Icecast (6737): OK
50+
# ✅ Web UI (8086): OK
51+
```
52+
53+
**Debug connection issues**:
54+
```bash
55+
./dev.sh logs # See all service logs
56+
./dev.sh status # Check health endpoints
57+
```
58+
59+
### Troubleshooting
60+
61+
**Microphone not working (macOS)**:
62+
1. System Settings → Sound → Input → Verify correct mic selected
63+
2. Check input level meter bounces when speaking
64+
3. Browser address bar → Click 🎙️ → Check device selection
65+
4. **Safari users**: Level meter may appear black initially (starts working when you speak)
66+
5. **Try different browser**: Brave/Chrome recommended for development
67+
68+
**Port already in use**:
69+
```bash
70+
./dev.sh stop # Stop all services
71+
lsof -i :6736 # See what's using port 6736
72+
```
73+
74+
**Services not responding**:
75+
```bash
76+
./dev.sh restart # Try restart first
77+
./dev.sh status # Check health
78+
./dev.sh logs # Check for errors
79+
```
80+
81+
## Development Modes
82+
83+
Edit `.env` to switch:
84+
85+
**Docker mode** (default):
86+
```bash
87+
DEV_MODE=docker
88+
```
89+
- All services in Docker
90+
- Production parity
91+
- Best for: testing, integration
92+
93+
**Local mode**:
94+
```bash
95+
DEV_MODE=local
96+
```
97+
- Signaling runs locally with hot reload
98+
- Icecast/coturn in Docker
99+
- Best for: backend development
100+
101+
Switch interactively: `./dev-switch.sh`
102+
103+
## Testing
104+
105+
```bash
106+
# Run automated test suite
107+
./run-pre-validation.sh
108+
109+
# Tests:
110+
# - WebRTC connections (2-peer)
111+
# - Audio graph routing
112+
# - Gain controls
113+
# - Program bus mixing
114+
# - Mix-minus calculation
115+
# - Return feed routing (bidirectional)
116+
```
117+
118+
## Key URLs
119+
120+
- **Web UI**: http://localhost:8086
121+
- **Signaling**: ws://localhost:6736
122+
- **Icecast**: http://localhost:6737
123+
- **Stream**: http://localhost:6737/live.opus
124+
125+
## Quick Tips
126+
127+
- **Visual mic check**: Look for green level meter in your participant card
128+
- **Join as second user**: Copy room URL from browser address bar
129+
- **Stop everything**: `./dev.sh stop`
130+
- **Fresh start**: `./dev.sh restart`
131+
132+
---
133+
134+
**Need help?** See full docs in `README.md` or run `./dev.sh help`

‎README.md‎

Lines changed: 66 additions & 15 deletions

0 commit comments

Comments
 (0)