function murl(fid) { return `/api/media?file_id=${encodeURIComponent(fid)}&auth=${encodeURIComponent(PASS)}`; } function fmtTime(sec) { if (!isFinite(sec) || sec < 0) sec = 0; const m = Math.floor(sec / 60), s = Math.floor(sec % 60); return m + ':' + String(s).padStart(2, '0'); } // A custom, glass-styled player shared by voice messages and videos — // replaces the native