summaryrefslogtreecommitdiff
path: root/www/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/api.js')
-rw-r--r--www/js/api.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/www/js/api.js b/www/js/api.js
index 833b120..d659cbb 100644
--- a/www/js/api.js
+++ b/www/js/api.js
@@ -78,13 +78,13 @@ window.html5ks.api = new (function () {
audio.onerror = function (e) {
if (e.code === e.MEDIA_ERR_SRC_NOT_SUPPORTED) {
i = setNextType(i);
- if (i) {
+ if (!i) {
+ console.log("no audio formats supported");
deferred.resolve();
- } else {
- throw new Error(e);
}
} else {
- throw new Error(e);
+ console.error("unknown audio error");
+ deferred.resolve();
}
};
audio.load();