-
Notifications
You must be signed in to change notification settings - Fork 229
Description
This item is about improving the usage in Electron environments.
Problem 1: It seems the renderer process of Electron has some Node-like globals defined which make alphaTab think it is running in a Node.js environment.
Solution 1: Improve the detection that we really identify the browser.
Problem 2: To spawn workers or worklets the respective files of alphaTab have to be available via a URL that can be loaded through standard browser APIs. For Electron in general it is easy, you can place any output files of your compiled app and it will be available. For Obsidian Plugins it might be more tricky.
Solution 2: One improvement is certainly to allow full customization of the worker/worklet URLs used for spawning workers. We used to have the scriptFile configuration but looking at the state today, we might need other mechanisms to specify the URL and worker type. Before building something we should find out how Obsidian/Electron can handle dynamic script loading.
Some points on this topic:
- We might add a custom lookup dictionary like we did for the SMuFL fonts to specify URLs for worker and worklet. This brings also other benefits where people might want to inject additional custom code.
- We might need to expose
alphaTab.corefrom the package.json so people can use it directly and make their ownalphaTab.main - We could also add a callback option where users implement their own logic to spawn workers. This way bundlers could pick up any special syntax constructs needed during bundling-packing (e.g. inline workers).