diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/api.js | 4 | ||||
-rw-r--r-- | www/js/menu.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/www/js/api.js b/www/js/api.js index 12e8ecc..46e8f54 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -37,7 +37,6 @@ window.html5ks.api = { _loadMedia: function (el, src, types) { var i = 0; var _nextType = function () { - i++; for (; i < types.length; i++) { var type = types[i]; if (el.canPlayType(type[0])) { @@ -46,7 +45,6 @@ window.html5ks.api = { return true; } } - return false; }; html5ks.spin(1); @@ -58,7 +56,7 @@ window.html5ks.api = { el.onerror = function (e) { if (e.code === e.MEDIA_ERR_SRC_NOT_SUPPORTED) { - if (_nextType()) { + if (_nextType(++i)) { console.warn("browser claimed support for " + types[i-1] + " but failed"); } else { console.error("no media formats supported"); diff --git a/www/js/menu.js b/www/js/menu.js index 89eceef..eb87111 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -26,6 +26,8 @@ html5ks.menu = { dialogs: document.getElementById("dialogs"), dialog: { options: document.getElementById("options"), + load: document.getElementById("load_dlg"), + save: document.getElementById("save_dlg"), retn: document.getElementById("return") }, mainMenu: document.getElementById("main-menu"), |