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
2 years 9 months ago - 2 years 9 months ago #159979 by Damian Freeman
Damian Freeman created the topic: Icecast / Shoutcast Support Tutorial
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: 2 years 9 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
2 years 9 months ago - 2 years 9 months ago #159980 by Damian Freeman
Damian Freeman replied the 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: 2 years 9 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
2 years 9 months ago - 2 years 9 months ago #159981 by Damian Freeman
Damian Freeman replied the topic: Icecast / Shoutcast Support Tutorial
if you want the links to further understand read these

jplayer nowplaying tutorial :

https://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: 2 years 9 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
2 years 9 months ago #159983 by Damian Freeman
Damian Freeman replied the 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.

More
2 years 9 months ago #159993 by Krikor Boghossian
Krikor Boghossian replied the 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

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

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

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

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

More
2 years 9 months ago #160030 by Krikor Boghossian
Krikor Boghossian replied the topic: Radionomy Title
I'll look into it and maybe add it to the module as an extra override.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

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

More
1 year 3 weeks ago #169379 by Richard van Opstal
Richard van Opstal replied the 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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 year 3 weeks ago #169392 by Fotis
Fotis replied the topic: Icecast / Shoutcast Support Tutorial
Use this: github.com/joomlaworks/Radiowave-generic-player

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

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum