Wondering if there is already an argument that is/can be passed to the Now Playing widget to force a periodic refresh of the div it is contained within.
As in, a listener goes to our site and is able to keep somewhat up to the minute with what is playing at the time without having to manually refresh the browser window.
Thought I’d ask before adding more jquery code to the site.
There’s no such feature. It’s been asked for often over the years we do not support implementations in which the browser does automatic widget reloads from spinitron.com. If you want that kind of display on a web page, we’d prefer you find a different implementation.
A persistent live updating display of the now playing song is useful to people who are listening to your station. Web visitors who are not listening aren’t likely to be disappointed that they can’t keep a browser tab open and watch it for updates.
So I think the most obvious approach is to display they now playing song where it is being played. This is in fact a requirement in US copyright law for eligibility to use the statutory webcast license. Any decent stream player will display the embedded metadata, be it a web-player, a mobile app, iTunes, an appliance, etc. If that’s the use case then I suggest looking for a web stream player that does this and use Spinitron’s metadata push.
Another option is to use the API. Our demo app for the API client displays a live updating display. The difference is that end users’ browsers are polling for updates from your server and not spinitron.com.
A WebSocket implementation of widget updates is on our todo list but its priority isn’t high.