diff --git a/src/lib/storage.js b/src/lib/storage.js index 6d858e6c20e57f919cbaa6dfc3eb2080b9f915ce..b2094c118d93248e8a373d32947a60927d0be320 100644 --- a/src/lib/storage.js +++ b/src/lib/storage.js @@ -25,6 +25,10 @@ class Storage extends ScratchStorage { [this.AssetType.ImageVector, this.AssetType.ImageBitmap, this.AssetType.Sound], asset => `${ASSET_SERVER}/internalapi/asset/${asset.assetId}.${asset.dataFormat}/get/` ); + this.addWebSource( + [this.AssetType.Sound], + asset => `/static/extension-assets/scratch3_music/${asset.assetId}.${asset.dataFormat}` + ); defaultProjectAssets.forEach(asset => this.cache( this.AssetType[asset.assetType], this.DataFormat[asset.dataFormat], diff --git a/webpack.config.js b/webpack.config.js index e9b97f9efa740c41a3abdbd0128f7260ad77bf48..5a654cfcd00acfdec098fba6b2f59ebc2ce5d664 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -107,6 +107,10 @@ module.exports = { from: 'node_modules/scratch-blocks/media', to: 'static/blocks-media' }]), + new CopyWebpackPlugin([{ + from: 'node_modules/scratch-vm/dist/node/assets', + to: 'static/extension-assets' + }]), new CopyWebpackPlugin([{ from: 'extensions/**', to: 'static',