Closed Lingomat closed 8 years ago
Webaudio solution implemented de9ded3600d416aba1dcfbe2caa857169eea4f38
For reference, the error callback from audioCtx.decodeAudioData doesn't return anything and fails to catch the DOM error from the promise. It's necessary to .catch() the promise error. In this commit the error is inserted into a pop up dialog but the error isn't very verbose, it simply says that audio decoding failed. It did this when I attempted to load an m4a file that had Apple's proprietary lossless codec in it.
So as suspected, a more robust implementation would need to inspect the containers and extract codec information. As this isn't going to happen soon I'll close this issue.
Specifically, we need to report failures on importing. It's not entirely clear how we might do this.
Firstly we need to tell users if a file type is supported, we can tell that from the extension. Secondly, some kind of systemic feedback based on feeding the file to the web audio API and seeing if that works. I'm not really hopeful about that. It seems to me like we might need to craft our own file-based validation.