Skip to content
Snippets Groups Projects
Commit 3de49606 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Allow more mime types to be processed.

Firefox and Safari both process mp3s as having audio/mpeg, and a variety of different audio/wav* possibilities.
parent f32399d3
Branches
Tags
No related merge requests found
...@@ -144,11 +144,15 @@ const costumeUpload = function (fileData, fileType, costumeName, storage, handle ...@@ -144,11 +144,15 @@ const costumeUpload = function (fileData, fileType, costumeName, storage, handle
const soundUpload = function (fileData, fileType, soundName, storage, handleSound) { const soundUpload = function (fileData, fileType, soundName, storage, handleSound) {
let soundFormat; let soundFormat;
switch (fileType) { switch (fileType) {
case 'audio/mp3': { case 'audio/mp3':
case 'audio/mpeg': {
soundFormat = storage.DataFormat.MP3; soundFormat = storage.DataFormat.MP3;
break; break;
} }
case 'audio/wav': { // TODO support audio/x-wav? Do we see this in the wild? case 'audio/wav':
case 'audio/wave':
case 'audio/x-wav':
case 'audio/x-pn-wav': {
soundFormat = storage.DataFormat.WAV; soundFormat = storage.DataFormat.WAV;
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment