Web Radio API constantly refreshing
I was trying to create a way via Laravel/Livewire to create some sort of Web Socket or otherwise continuous “communicate” with my API end-point. Basically I’m creating a Web Radio that allows me to listen to songs via AzuraCast. The API response gives me a lot of information including, “seconds_remaining”, “seconds_total”, “elapsed_second”. The fact is that I would like to be able to update my API, using a sort of Timer that, at the end of these “remaining_seconds”, my component has a refresh without “influencing” the Network Service too much.
I’m currently trying to update my component like this: