I'm currently trying to set up jPlayer on the website of a local school radio station that uses Airtime and Icecast, and I'd like to make it so that when someone plays a prerecorded show (MP3 file) it shows the name and metadata, and when the live stream is played then it shows the metadata from the Icecast/Airtime stream.
For the former, jPlayer already works perfectly since it uses the native HTML5 player, which already fetches MP3 metadata. For the latter, I've seen that jPlayer doesn't support that. So I'm writing a script that will bind on jPlayer time update event (which occurs every ~250 ms) and fetch the metadata from Airtime. I know how to do that, I've already done it for another radio station. The problem is that I can only get the current metadata (and the previous/next shows). Which would work, except I want the "pause" button to work to. But if I keep doing it like this, the "pause" button will pause the audio, but the metadata shown under it will continue to update, and will not be in sync with the audio. As jPlayer keeps track of the current position in the live stream, is there a way to do like http://myradio.com/api/metadata?t=601:08 (or t=36068 in seconds)?
I know it would be possible to simply get the list of shows, for each show get the show metadata, then find the show that "contains" the current time and show that metadata. But is there a better way?