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

Function onEngineTime

static/mobile/app.js:196–204  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

194}
195
196function onEngineTime(t) {
197 const dur = curDuration() || 1;
198 state.progress = Math.max(0, Math.min(1, t / dur));
199 const head = app.querySelector(".playhead");
200 const cur = app.querySelector(".wave-times .cur");
201 if (head) head.style.left = state.progress * 100 + "%";
202 if (cur) cur.textContent = fmt(t);
203 paintWaveProgress();
204}
205
206// Load a track: fetch detail, build lanes, spin up the Web Audio engine.
207async function openTrack(card, { autoplay = false } = {}) {

Callers

nothing calls this directly

Calls 3

curDurationFunction · 0.85
fmtFunction · 0.85
paintWaveProgressFunction · 0.85

Tested by

no test coverage detected