Okay
  Public Ticket #2032151
Waveform absent when loading mp3 externally
Closed

Comments

  • Osu started the conversation

    Hi there,

    Great plugin, thanks so much for this. The problem I'm having is that the waveform for externally loaded mp3 files isn't being generated. I'm getting the following error in Chrome's inspector which I suspect is the issue, but I don't know how to resolve it:

    "Access to XMLHttpRequest at '...URL...' from origin 'http://localhost:8888' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

    Any idea what I can do to get this working?

    Many thanks,

    Osu

  •  1,103
    Max replied

    You are developing your website locally right ?

    What is the stream URL you are trying to play?

    2 things:

    - Since you seem to develop from an http local website (not https), make sure the stream url is also a NON http. both your website and its stream shall use the same protocol (either http or https) otherwise, it falls under a cors policy.

    Thanks,


    Max from the Sonaar.io Crew

  • Osu replied

    Hi Maxime,

    Thanks for this and apologies for the slow response. I've actually upgraded my site to https using a local ssl certificate as I'm developing locally, so the site is now on https://localhostssl:8890/. I've also tried loading the file from my old live site (also on https), but it's still not showing the waveform - see the snapshot.

    Do you know what else I can try? The full error is:

    Access to XMLHttpRequest at 'https://www.mydomain.com/wp-content/uploads/2019/05/gypsy_tangomontage.mp3' from origin 'https://localhostssl:8890' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

  •   Osu replied privately
  •  1,103
    Max replied

    You have a cors policy issue. please ask your hosting provider to allow origin access to * or to your domain name (which is local host)

    What you can do, is to show them this message: Access to XMLHttpRequest at 'https://www.mydomain.com/wp-content/uploads/2019/05/gypsy_tangomontage.mp3' from origin 'https://localhostssl:8890' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    If they are good at it, they will be able to fix it for you.


    Thanks,


    Max from the Sonaar.io Crew