(loading, phrase)
| 712 | let _currentHasVideo = false; |
| 713 | |
| 714 | export 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 | |
| 735 | export function buildStripStems() { |
| 736 | const container = document.getElementById("appbarStripStems"); |
no outgoing calls
no test coverage detected