()
| 957 | // the ruler also update the visual without extra plumbing. |
| 958 | const STOP_TOLERANCE_SEC = 0.15; |
| 959 | const updateStopVisual = () => { |
| 960 | const src = audioEngine ?? mt; |
| 961 | const t = src.getCurrentTime?.() ?? 0; |
| 962 | const startPos = loopEnabled ? loopStart : 0; |
| 963 | const atStart = Math.abs(t - startPos) < STOP_TOLERANCE_SEC; |
| 964 | const stopped = !src.isPlaying() && atStart; |
| 965 | stopBtn.classList.toggle("stopped", stopped); |
| 966 | }; |
| 967 | |
| 968 | mt.once("canplay", () => { |
| 969 | setWaveformLoading(false); |
no outgoing calls
no test coverage detected