()
| 183 | // (≤ N times over the whole track), not every animation frame. |
| 184 | let _lastPlayedBar = -1; |
| 185 | function paintWaveProgress() { |
| 186 | const bars = app.querySelectorAll(".wave-bars > i"); |
| 187 | if (!bars.length) return; |
| 188 | const played = Math.round(state.progress * bars.length); |
| 189 | if (played === _lastPlayedBar) return; |
| 190 | for (let i = 0; i < bars.length; i++) { |
| 191 | bars[i].style.background = i <= played ? "#f5b417" : "#34343c"; |
| 192 | } |
| 193 | _lastPlayedBar = played; |
| 194 | } |
| 195 | |
| 196 | function onEngineTime(t) { |
| 197 | const dur = curDuration() || 1; |
no outgoing calls
no test coverage detected