on ? playTrack(idx, isNaN(t) ? 0 : t) : loadTrack(idx);
} else { startMarquee(); }
});
function startMarquee(){
const text = title1.textContent;
marqueeWrap.innerHTML = "";
for (let i = 0; i < 3; i++) {
const s = document.createElement("span");
s.className = "ffk-marquee-item";
s.textContent = text;
marqueeWrap.appendChild(s);
}
const fw = marqueeWrap.children[0].offsetWidth + 60;
let pos = 0;
const speed = 0.65;
function frame(){ pos -= speed; if (-pos >= fw) pos += fw; marqueeWrap.style.transform = `translate3d(${pos}px,0,0)`; requestAnimationFrame(frame); }
requestAnimationFrame(frame);
}
}
}