This script is brilliant - Wavestreaming/jquery-shoutcast GitHub Wiki
you will need to do something like this for it to work even so, its difficult to make it work with other javascripts so take it easy on the loading of your page and you will also need to adapt the shoutcast.js to listen to https instead of just http ok
<title>Radio PsyBrazil</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>Now Playing:
Next Track:
Listeners: /max listeners
Peak of: /live unique listeners
Total of: / status
Quality: kbps/
<script>
// Ensure no conflicts between scripts
(function($) {
$(function() {
// Initialize the audio player
// Initialize the SHOUTcast plugin for played tracks and current song title
$.SHOUTcast({
host: 'radio.psybrazil.com.br',
port: 443,
playedInterval: 20000,
played: function(tracks) {
$('#played').html(''); // Target the correct ID
$.each(tracks, function(k, track) {
$('#played').append('<li>' + track.title + '</li>');
});
},
stats: function() {
$('#songtitle').text(this.get('songtitle', 'Off Air'));
}
}).startPlayed().startStats();
});
})(jQuery);
</script>
<script src="assets/js/jquery.shoutcast.min.js?host=radio.psybrazil.com.br&port=443"></script>
<script src="assets/js/jquery.shoutcast.easy.min.js?host=radio.psybrazil.com.br/psybrazil&port=443"></script>