export function formatDuration(ms: number): string { const sec = Math.floor(ms / 1000); const m = Math.floor(sec / 60); const s = sec % 60; return `${m}:${s.toString().padStart(2, '0')}`; } export function formatTime(sec: number): string { if (!sec || isNaN(sec)) return '0:00'; const m = Math.floor(sec / 60); const s = Math.floor(sec % 60); return `${m}:${s.toString().padStart(2, '0')}`; } export function formatPlayCount(count: number): string { if (!count) return '0'; if (count >= 100000000) return (count / 100000000).toFixed(1) + '亿'; if (count >= 10000) return (count / 10000).toFixed(1) + '万'; return count.toString(); }