diff --git a/package.json b/package.json
index b31d30af2..0308aa6f7 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"scratch-audio": "^0.1.0-prerelease.0",
"scratch-blocks": "^0.1.0-prerelease.0",
"scratch-render": "^0.1.0-prerelease.0",
- "scratch-storage": "^0.0.1-prerelease.0",
+ "scratch-storage": "^0.1.0",
"script-loader": "0.7.0",
"stats.js": "^0.17.0",
"tap": "^10.2.0",
diff --git a/src/import/load-costume.js b/src/import/load-costume.js
index 5d9fdc1d5..a9323398d 100644
--- a/src/import/load-costume.js
+++ b/src/import/load-costume.js
@@ -30,7 +30,8 @@ const loadCostume = function (md5ext, costume, runtime) {
];
let promise = runtime.storage.load(assetType, md5).then(costumeAsset => {
- costume.url = costumeAsset.encodeDataURI();
+ costume.assetId = costumeAsset.assetId;
+ costume.assetType = assetType;
return costumeAsset;
});
diff --git a/src/import/load-sound.js b/src/import/load-sound.js
index f54f5fe32..a308e1516 100644
--- a/src/import/load-sound.js
+++ b/src/import/load-sound.js
@@ -19,10 +19,17 @@ const loadSound = function (sound, runtime) {
}
const idParts = sound.md5.split('.');
const md5 = idParts[0];
- return runtime.storage.load(runtime.storage.AssetType.Sound, md5).then(soundAsset => {
- sound.data = soundAsset.data;
- return runtime.audioEngine.decodeSound(sound).then(() => sound);
- });
+ return runtime.storage.load(runtime.storage.AssetType.Sound, md5)
+ .then(soundAsset => {
+ sound.assetId = soundAsset.assetId;
+ sound.assetType = runtime.storage.AssetType.Sound;
+ return runtime.audioEngine.decodeSound(Object.assign(
+ {},
+ sound,
+ {data: soundAsset.data}
+ ));
+ })
+ .then(() => sound);
};
module.exports = loadSound;
diff --git a/src/playground/index.html b/src/playground/index.html
index 5f293e9b4..d248b9847 100644
--- a/src/playground/index.html
+++ b/src/playground/index.html
@@ -53,9 +53,9 @@
-
+
-
+