I have a shoutcast server v2.6 and a website with a player on the same server. The player already show title and artist from the audio stream. With shoutcast 2 stream, we can display the album art simply by this URL: url_of_the_server/playingart?sid=1 (for stream 1) but it has to be refreshed So, I am a newbee, would you help me to get a code to display this url and refresh it without refreshing the page, so has to be in javascript or jquery. Thank you
Asked
Active
Viewed 510 times
1 Answers
0
This is an example pseudo code for Jquery
function loadImage(){
$.ajax({
url: 'url_of_the_server/playingart?sid=1',
type: 'get',
success: function(response){
// Display image from response
}
});
}
$(document).ready(function(){
// Run every 5 seconds
setInterval(loadImage, 5000);
});
Another option is to remove image every 5 seconds and replace it with a new URL

Alex Paramonov
- 2,630
- 2
- 23
- 27
-
What is `sid` in that case? – philk Nov 03 '22 at 14:48
-
SID is "stream ID" in Shoutcast – Alex Paramonov Nov 04 '22 at 11:27