Closed ericrosenbaum closed 6 years ago
// WebHelper.js
nets({ url: url }, function (err, resp, body) {
// body is a Buffer
if (err) {
tryNextSource();
} else {
asset.setData(body, dataFormat);
fulfill(asset);
}
});
To load the MP3 from CDN, Maybe the network, I got this result
Because err is null, tryNextSource does not work. I can not load the mp3 from local Load fail, the misic blocks did not work.
Expected Behavior
Loading static assets should leave the console quiet.
Actual Behavior
When you load a static asset, for example
https://llk.github.io/scratch-gui/develop/static/extension-assets/scratch3_music/instruments/1-piano/36.mp3
, it works, but you also get a 404 error because storage first looks for it on the assets server:Failed to load https://cdn.assets.scratch.mit.edu/internalapi/asset/instruments/1-piano/36.mp3/get/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://llk.github.io' is therefore not allowed access. The response had HTTP status code 404.
Steps to Reproduce
Load the music extension and check the console.