Closed kaigem closed 4 years ago
Hey there! Could you provide an example stream URL that you're using for testing?
Further Rock Radio - http://streaming.live365.com/a81821
This particular station worked for us in the past. They recently switched platforms to live365 and we can no longer obtain their metadata.
In the mean time it looks like the actual URL to the audio, http://ais-edge07-live365-dal02.cdnstream.com/a81821
, is working ok:
{
title: "Hellacopters, the - 03 - Sometimes I Don't Know",
fetchsource: 'STREAM',
headers: {
'icy-br': '128',
'icy-pub': '0',
'icy-description': 'Further Rock Radio',
'icy-genre': 'TBD',
'icy-metaint': '8192',
'icy-name': 'Further Rock Radio',
'content-type': 'audio/mpeg'
}
}
The audio has indeed been working fine on our app. We just cannot get the metadata, which to our listeners is very frustrating. I will try using the URL above in our code to see if behaves differently than the browser-friendly URL. Thanks!
Ok, it's fixed in master. I'll get a release up to NPM after #18 gets cleared up.
I downloaded the latest version of the plugin and we are still seeing problems with the aforementioned streams. Could you please explain, mechanically, what the plugin is doing?
By latest version, do you mean master? Or latest release? There has not been a release yet with this fix:
https://github.com/gabek/node-internet-radio/commit/f68094fe7a987852782b164e26c0dd302c998560
Version 0.2.1 has now been published to NPM. Please let me know if you still run into issues.
We are still experiencing issues with our broadcasters that use live365. The error we are getting appears to be a timeout error
Error: Attempting to fetch station data via stream timed out.
at Timeout.
The code has a hardcoded 5 second timeout. If I run the test against your stream and allow the test the 5 seconds as well I get a success. If you run this same test test/integration/test.js
do you get the same results? It takes about 3 seconds to run.
../../node_modules/.bin/mocha --timeout 5000 test.js
I performed the test on the Further stream and it works fine, although it does not spit out the full metadata like you have above. I just see this:
$ ../../node_modules/.bin/mocha --timeout 5000 test.js
Try all available methods and return a station object. √ Should have applicable properties. (2609ms)
1 passing (3s)
As long as it works though, it will be fine on our end.
What do you recommend we do to override the timeout?
Sorry about that, I added the spitting out of the full metadata just for my local testing so I could see what's coming out.
I could add an additional parameter to customize the timeout. Though 5 seconds is a pretty long time, but I see no reason not to let you change it if you have reasons to. I'll get to that this week.
I'm.... I"m not sure the timeout is the problem. The station passes your diagnostic test in less than 5 seconds. Something else is going wrong when it runs on the live app though. That is why I was hoping to see the raw metadata, I wanted to see how it was processed. Unfortunately we can't even get the module to identify the stream when we use it.
You can print out the metadata in the test if that's helpful to you just by adding a line in test/integration/test.js
-var testStream = "http://ice1.somafm.com/groovesalad-128.mp3";
+var testStream = "http://ais-edge07-live365-dal02.cdnstream.com/a81821";
main.getStationInfo(testStream, function (error, station) {
+ console.log(station)
expect(station).to.exist;
I wish I had another suggestion of why when you run the same code in your actual app it's not working. Is something blocking something, making it take longer? I'd just try simplifying things as much as possible and just try running it just like the test does and adding back your other code to try to see what's going on.
Hello,
We've been having trouble with a few of our affiliates who stream on live365. The node-internet-radio module times out on retrieving the metadata for these streams. The module attempts the icystream method for these streams.
Thanks for looking into this!
-Kaigem