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

alphaTab cannot be used directly via jsdelivr CDN anymore (ESM) #1917

Closed
1 task done
Danielku15 opened this issue Feb 26, 2025 · 0 comments · Fixed by #1918
Closed
1 task done

alphaTab cannot be used directly via jsdelivr CDN anymore (ESM) #1917

Danielku15 opened this issue Feb 26, 2025 · 0 comments · Fixed by #1918
Assignees
Labels
area-core Related to some core parts of alphaTab platform-javascript Related to the JavaScript version of alphaTab state-accepted This is a valid topic to work on.
Milestone

Comments

@Danielku15
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When importing alphaTab directly from a CDN like JsDelivr (using ESM imports) we get a bunch of CORS errors when spawning the worker.

[AlphaTab][Rendering] Failed to create WebWorker: SecurityError: Failed to construct 'Worker': Script at 'https://cdn.jsdelivr.net/npm/@coderline/alphatab@latest/dist/alphaTab.worker.min.mjs' cannot be accessed from origin 'http://localhost:3000'.

[AlphaTab][Rendering] Failed to create WebWorker: SecurityError: Failed to construct 'Worker': Script at 'https://cdn.jsdelivr.net/npm/@coderline/alphatab@alpha/dist/alphaTab.worker.min.mjs' cannot be accessed from origin 'http://localhost:3000'.

Expected Behavior

The alphaTab worker and audio worklets (if possible) should launch via the ESM version allowing alphaTab to be used directly via CDNs.

Steps To Reproduce

https://github.com/CoderLine/alphaTabSamplesWeb

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.4 (alpha)

Platform

Web

Environment

- **OS**: Windows 11 Pro
- **Browser**: Chrome

Anything else?

No response

@Danielku15 Danielku15 added area-core Related to some core parts of alphaTab platform-javascript Related to the JavaScript version of alphaTab state-accepted This is a valid topic to work on. labels Feb 26, 2025
@Danielku15 Danielku15 added this to the 1.4.0 milestone Feb 26, 2025
@Danielku15 Danielku15 self-assigned this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core Related to some core parts of alphaTab platform-javascript Related to the JavaScript version of alphaTab state-accepted This is a valid topic to work on.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant