MCPcopy
hub / github.com/stemdeckapp/stemdeck / paintWaveProgress

Function paintWaveProgress

static/mobile/app.js:185–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

183// (≤ N times over the whole track), not every animation frame.
184let _lastPlayedBar = -1;
185function 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
196function onEngineTime(t) {
197 const dur = curDuration() || 1;

Callers 2

onEngineTimeFunction · 0.85
seekFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected