Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Icecast / Shoutcast Support Tutorial

  • Damian Freeman
  • Damian Freeman's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #159979 by Damian Freeman
Icecast / Shoutcast Support Tutorial was created by Damian Freeman
disclaimer IT IS ADVISED THAT YOU BACKUP YOUR SITE AND TEMPLATES BEFOR MAKING ANY CHANGES YOU ARE WARNED!!!!

"OK I AM NOT A EXPERT CODER BUT I MANAGE SO WITH THAT SAID I AM OPEN TO ANY IMPROVEMENTS AND ADDITIONS TO THIS TUTORIAL AND ITS CODES
THERE ARE SOME THINGS I WOULD LIKE TO ADD WITH THE HELP OF EVERY ONE BUT WITH OUT FURTHER A DUE THIS IS WHAT WE HAVE FOR NOW"


to allow your player to use alternate stream such as shoutcast or icecast go to your themes js directory located at /templates/radiowave/js/ and you will see a js file named radiojar.js open and edit line 12.

original line with radiojar support
// For the Player
rjq('#rjp-radiojar-player').radiojar('player', {
  "streamname": "u7ujij",


replaced line with m3u support
// For the Player
rjq('#rjp-radiojar-player').radiojar('player', {
  "streamUrl": "http://100.12.28.133:8006/listen",
Last edit: 7 years 2 months ago by Damian Freeman.

Please Log in or Create an account to join the conversation.

  • Damian Freeman
  • Damian Freeman's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #159980 by Damian Freeman
Replied by Damian Freeman on topic Icecast / Shoutcast Support Tutorial
add this to the bottom of your custom.js file


/* html, icecast, javascript, jplayer, jquery icecast support get track title now playing*/

function radioTitle() {

  // this is the URL of the json.xml file located on your server.
  var url = 'http://100.12.28.133:8006/status-json.xsl';

  jQuery.ajax({
    type: 'GET',
    url: url,
    async: true,
    jsonpCallback: 'parseMusic',
    contentType: "application/json",
    dataType: 'jsonp',
    success: function(json) {
      // this is the element we're updating that will hold the track title. 
      jQuery('#track-title').text(json['/listen']['title']); // ['/listen'] should reflect your mount point
      // this is the element we're updating that will hold the listeners count
      jQuery('#listeners').text(json['/listen']['listeners']); // ['/listen'] should reflect your mount point
    },
    error: function(e) {
      console.log(e.message);
    }
  });

}

jQuery(document).ready(function() {

  setTimeout(function() {
    radioTitle();
  }, 20000);
  setInterval(function() {
    radioTitle();
  }, 500); // we're going to update our html elements / player every 15 seconds

});


NEXT STEP

ADD HTML LINE TO "PLAYER" module
<p><span id="track-title" class="rjp-info"></span></p>


NEXT STEP

ALSO ADD HTML LINE TO "POPUP" module
<p><span id="track-title" class="rjp-info"></span></p>
Last edit: 7 years 2 months ago by Damian Freeman.

Please Log in or Create an account to join the conversation.

  • Damian Freeman
  • Damian Freeman's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #159981 by Damian Freeman
Replied by Damian Freeman on topic Icecast / Shoutcast Support Tutorial
if you want the links to further understand read these

jplayer nowplaying tutorial :

linge-ma.ws/update-listeners-track-on-a-website-using-icecast-jsonp-and-jquery/

Nowplaying Track Demo :

jsfiddle.net/Znuff/vL5TM/



FYI

if your using nicecast older versions you have to add the status-json.xsl and xml2json.xslt to the icecast2's web folder
Last edit: 7 years 2 months ago by Damian Freeman. Reason: status-json.xsl and xml2json.xslt

Please Log in or Create an account to join the conversation.

  • Damian Freeman
  • Damian Freeman's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #159983 by Damian Freeman
Replied by Damian Freeman on topic Radionomy Title
Radionomy Title

Code & Demo : jsfiddle.net/9d2wx4n6/2/

Html
<p> <span id="artist"></span> - <span id="track-title">Buffering</span> Listeners: <span id="listeners"></span> </p>



JS
function radionomyTitle() {

  // this is the URL of the json.xml file if you know the full direct url .
  var url = 'http://api2.radionomy.com/currentsong.cfm?type=json&size=70&callmeback=yes&cover=yes&radiouid=d3dee3eb-0b86-4829-8acb-a14b9f6d61f8&jsonp';

  // this is the radionomy currentsong api link .
  var api = 'http://api2.radionomy.com/currentsong.cfm?type=json&size=70&callmeback=yes&cover=yes&radiouid=';

  // this is you radionomy uid or stations if you can find it.
  var uid = 'd3dee3eb-0b86-4829-8acb-a14b9f6d61f8';

  // this is the radionomy url shortcut command.
  var radionamyinfo = "http://api2.radionomy.com/currentsong.cfm?type=json&size=70&callmeback=yes&cover=yes&radiouid=" + uid + "&jsonp";

  $.ajax({
    type: 'GET',
    url: radionamyinfo, // "radionamyinfo" var is default but use "url" if fail    .
    async: true,
    jsonpCallback: 'GetPlayInfo',
    contentType: "application/json",
    dataType: 'jsonp',
    success: function(json) {
      // this is the element we're updating that will hold the track title
      $('#artist').text(json['tracks']['artists'])
        // this is the element we're updating that will hold the track title
      $('#track-title').text(json['tracks']['title'])
        // this is the element we're updating that will hold the listeners count
      $('#listeners').text(json['tracks']['current']);
    },
    error: function(e) {
      console.log(e.message);
    }
  });

}

$(document).ready(function() {

  setTimeout(function() {
    radionomyTitle();
  }, 2000);
  setInterval(function() {
    radionomyTitle();
  }, 1500); // we're going to update our html elements / player every 15 seconds

});

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #159993 by Krikor Boghossian
Replied by Krikor Boghossian on topic Radionomy Title
Kudos for the Radionomy :)
For Icecast/ Shoutcast you can use the custom player module as well,

github.com/joomlaworks/Radiowave-generic-player

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Damian Freeman
  • Damian Freeman's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #160020 by Damian Freeman
Replied by Damian Freeman on topic Radionomy Title
anytime @radionomy and thanks @custom player module

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #160030 by Krikor Boghossian
Replied by Krikor Boghossian on topic Radionomy Title
I'll look into it and maybe add it to the module as an extra override.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #169379 by Richard van Opstal
Replied by Richard van Opstal on topic Icecast / Shoutcast Support Tutorial
Hello all,

I have try to show the artirst en titel on my website but it don't show. We have Shoutcast V2.
Wee can give me the anser?

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #169392 by JoomlaWorks
Replied by JoomlaWorks on topic Icecast / Shoutcast Support Tutorial
Use this: github.com/joomlaworks/Radiowave-generic-player

For further assistance, please post a ticket in our helpdesk system.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
4 days 19 hours ago #181562 by michaelzaky
Replied by michaelzaky on topic Icecast / Shoutcast Support Tutorial
You can start your own Internet Radio Station in minutes for FREE using the

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum