Skip to content

Help me please, how do i get my audio to load from wavesurfer.js #72861

Discussion options

You must be logged in to vote

The error you are encountering is related to the Same-Origin Policy in web browsers, which prevents your website from making requests to resources on a different domain. When you load an audio file from your local filesystem using a "file://" URL or from a different domain, you might encounter CORS (Cross-Origin Resource Sharing) issues.

To resolve these issues and make the audio file work on your GitHub Pages website, you should follow these steps:

Host the audio file on the same domain as your GitHub Pages website. This means uploading the audio file to your GitHub repository and making it accessible via a relative URL, not a "file://" URL.

In your HTML code, make sure to use a relative…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@annwon603
Comment options

@mamoon-rasheed
Comment options

@mamoon-rasheed
Comment options

Answer selected by annwon603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Programming Help Programming languages, open source, and software development.
2 participants