Closed RolandJansen closed 4 years ago
Public API should have functions for different file types:
not needed in v0.5.0
a fileloader makes sense when plugins can be loaded -> switched to v0.7.0
How to load js code at runtime:
worker, plugins and scripts can be loaded from client and server. Last thing is to load javascript from a string. That should do it.
loading js from string is probably not the best idea. There is a follow-up ticket #161 to load/save json instead.
file loading is stripped from the Sound (now DemoSampler) class because it is a dedicated task. There should be an intermix component for this as it will be needed in many subsystems in the future (for audio-, project- and preset-files).
See: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API https://www.html5rocks.com/en/tutorials/file/dndfiles/