Allow putting mp3 sounds in the backpack.

This commit is contained in:
Karishma Chadha committed 2019-01-10 14:55:33 -05:00
1 parent e649530f6b
commit 40de587b0d
1 file changed
+7
+7
View File
@@ -18,6 +18,13 @@ const soundPayload = sound => {
payload.mime = 'audio/x-wav';
payload.body = assetDataUrl.replace('data:audio/x-wav;base64,', '');
break;
case 'mp3':
payload.mime = 'audio/mp3';
// TODO scratch-storage should be fixed so that encodeDataURI does not
// always prepend the wave format header; Once that is fixed, the following
// line will have to change.
payload.body = assetDataUrl.replace('data:audio/x-wav;base64,', '');
break;
default:
alert(`Cannot serialize for format: ${assetDataFormat}`); // eslint-disable-line
}