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

Function updateFooterTrack

static/js/player.js:1238–1266  ·  view source on GitHub ↗
({ title, thumbnail, key, bpm, stemCount } = {})

Source from the content-addressed store, hash-verified

1236}
1237
1238export function updateFooterTrack({ title, thumbnail, key, bpm, stemCount } = {}) {
1239 if (footerThumb) {
1240 const artEl = footerThumb.closest(".footer-art");
1241 if (thumbnail) {
1242 footerThumb.src = thumbnail;
1243 footerThumb.onload = () => {
1244 footerThumb.classList.add("loaded");
1245 artEl?.classList.add("has-art");
1246 };
1247 footerThumb.onerror = () => {
1248 footerThumb.classList.remove("loaded");
1249 artEl?.classList.remove("has-art");
1250 };
1251 } else {
1252 footerThumb.removeAttribute("src");
1253 footerThumb.classList.remove("loaded");
1254 artEl?.classList.remove("has-art");
1255 }
1256 }
1257 if (footerTitle && title !== undefined) footerTitle.textContent = title;
1258 if (footerMeta) {
1259 const parts = [];
1260 if (key) parts.push(key);
1261 if (bpm) parts.push(`${Math.round(bpm)} BPM`);
1262 if (stemCount != null) parts.push(`${stemCount} Stems`);
1263 if (key !== undefined || bpm !== undefined || stemCount !== undefined)
1264 footerMeta.textContent = parts.join(" • ");
1265 }
1266}
1267
1268function _triggerDownload(url, filename) {
1269 const fullUrl = url.startsWith("http") ? url : `${location.origin}${url}`;

Callers 4

applyTrackInfoToPanelFunction · 0.90
applyStateFunction · 0.90
destroyPlayerFunction · 0.85
wireUpAudioFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected