Better URL configuration
Closed this issue · 1 comments
danigb commented
Currently the way to change the default url generation is by overriding a class method. While this is good for testing, it's not good for humans. Let's improve it.
Proposals:
- Pass the generateUrl function in the constructor:
new Soundfont(ctx, function(name) { return ... })
- Add options to the constructor:
new Soundfont(ctx, { base: 'http://...', format: 'mp3' })
- Combine both
Any ideas?
danigb commented
This is now implemented. You can pass a nameToUrl
function to the constructor.