Giter Site home page Giter Site logo

Comments (14)

gabek avatar gabek commented on August 25, 2024

Hey there! Could you provide an example stream URL that you're using for testing?

from node-internet-radio.

kaigem avatar kaigem commented on August 25, 2024

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.

from node-internet-radio.

gabek avatar gabek commented on August 25, 2024

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'
  }
}

from node-internet-radio.

kaigem avatar kaigem commented on August 25, 2024

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!

from node-internet-radio.

gabek avatar gabek commented on August 25, 2024

Ok, it's fixed in master. I'll get a release up to NPM after #18 gets cleared up.

from node-internet-radio.

kaigem avatar kaigem commented on August 25, 2024

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?

from node-internet-radio.

gabek avatar gabek commented on August 25, 2024

By latest version, do you mean master? Or latest release? There has not been a release yet with this fix:

f68094f

from node-internet-radio.

gabek avatar gabek commented on August 25, 2024

Version 0.2.1 has now been published to NPM. Please let me know if you still run into issues.

from node-internet-radio.

kaigem avatar kaigem commented on August 25, 2024

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. (/root/internetfm_server/node_modules/node-internet-radio/lib/icystream.js:20:7)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)

from node-internet-radio.

gabek avatar gabek commented on August 25, 2024

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

image

from node-internet-radio.

kaigem avatar kaigem commented on August 25, 2024

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?

from node-internet-radio.

gabek avatar gabek commented on August 25, 2024

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.

from node-internet-radio.

kaigem avatar kaigem commented on August 25, 2024

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.

from node-internet-radio.

gabek avatar gabek commented on August 25, 2024

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.

from node-internet-radio.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.