Giter Club home page Giter Club logo

Comments (3)

edier88 avatar edier88 commented on July 17, 2024 1

Hi, I appreciate too much your fast response, I want to apologise for my late one.
It turned out to be a CORS problem, I'm using Icecast 2.4.4
What I did is to set the headers you described in your troubleshooting steps in the icecast.xml, just after the listen-socket tags. This way:

<http-headers>
    <header name="Access-Control-Allow-Origin" value="*" />
    <header name="Access-Control-Allow-Methods" value="GET,OPTIONS" />
    <header name="Access-Control-Allow-Headers" value="Content-Type,Icy-Metadata" />
    <header name="Access-Control-Expose-Headers" value="Icy-MetaInt,Icy-Br,Icy-Description,Icy-Genre,Icy-Name,Ice-Audio-Info,Icy-Url,Icy-Sr,Icy-Vbr,Icy-Pub" />
</http-headers>

I also set the "metadataTypes" to "ogg":

const getIcecastMetadataPlayer = () => {
      icecastMetadataPlayer = new IcecastMetadataPlayer(endpoint.value, {
        audioElement,
        onMetadata,
        onMetadataEnqueue,
        metadataTypes: ["ogg"],
        icyDetectionTimeout: 5000,
        enableLogging: true,
        onError: (message) => {
          metadataEl.innerHTML = message;
        },
      });
    };

I want to thank you for the great library. Keep it that way!

from icecast-metadata-js.

eshaz avatar eshaz commented on July 17, 2024

Hi, there are a few common things that can go wrong. Could you take a look at the troubleshooting steps and see if any of these help?

I've never seen that error before in Icecast. If you can play the stream in something like VLC, or just by pasting the URL in your browser, I would think that should rule out any icecast.xml parsing issues.

You should see more details on the error by clicking on the network request in your browser console. Could you post a screenshot of that for one of the failing requests?

from icecast-metadata-js.

eshaz avatar eshaz commented on July 17, 2024

Glad you figured it out!

from icecast-metadata-js.

Related Issues (20)

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.