Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: code radio not working on Safari browser #293

Closed
wants to merge 2 commits into from

Conversation

IgnorantSapient
Copy link

Checklist:

Closes #292

@huyenltnguyen huyenltnguyen changed the title Fixes code radio not working on Safari browser fix: code radio not working on Safari browser Feb 21, 2024
@huyenltnguyen
Copy link
Member

huyenltnguyen commented Feb 21, 2024

@IgnorantSapient Thank you for reporting the issue and for the fix.

The failed test will be fixed once #296 is merged.


I spent hours looking into this, and want to post the investigation here for posterity.

We have Access-Control-Allow-Origin: * in the response header, and apparently Safari doesn't accept Access-Control-Allow-Origin" being a wildcard. So instead, we would need to be explicit in which origins we allow.

Some devices even require additional headers such as Content-Type", "Accept-Encoding", or "Range":

The workaround is to not use CORS on Safari by omitting the crossorigin attribute, which is the change made by this PR.

@huyenltnguyen
Copy link
Member

We have made some major changes to the code radio setup to improve the stability of the app. The changes also address the Safari issue, so I'm closing this PR in favor of #305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Radio does not play music on Safari Browser
2 participants