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

Function setWaveformLoading

static/js/player.js:714–733  ·  view source on GitHub ↗
(loading, phrase)

Source from the content-addressed store, hash-verified

712let _currentHasVideo = false;
713
714export function setWaveformLoading(loading, phrase) {
715 const el = document.getElementById("waveLoadingOverlay");
716 if (!el) return;
717 if (loading) {
718 _loadingShownAt = performance.now();
719 const phraseEl = document.getElementById("waveLoadingPhrase");
720 if (phraseEl && phrase !== undefined) phraseEl.textContent = phrase;
721 else if (phraseEl && !phraseEl.textContent) phraseEl.textContent = "Still loading waveform…";
722 el.classList.remove("hidden");
723 } else {
724 const elapsed = performance.now() - _loadingShownAt;
725 const delay = Math.max(0, _LOADING_MIN_MS - elapsed);
726 window.setTimeout(() => {
727 el.classList.add("hidden");
728 el.classList.remove("stalled");
729 const phraseEl = document.getElementById("waveLoadingPhrase");
730 if (phraseEl) phraseEl.textContent = "";
731 }, delay);
732 }
733}
734
735export function buildStripStems() {
736 const container = document.getElementById("appbarStripStems");

Callers 4

applyStateFunction · 0.90
importFromUrlFunction · 0.90
wireJobFormFunction · 0.90
wireUpAudioFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected