ok risolto in questo modo:
codice:const app = { init: function() { app.start(); }, start: function() { setInterval(async () => { const data = await app.playerNow(); app.dataOnAir(data); }, 5000); }, playerNow: async function() { const url = "https://www.radiomatese.it/script/app/details.php"; const response = await fetch(url); if (response.ok) { return response.json(); } }, dataOnAir: function(data) { console.log(data); } }; app.init();