From 7dc90523db9097b00c5f49ad9c9e3c4fb36719ce Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Tue, 25 Feb 2014 17:28:50 -0500 Subject: bleh more --- www/js/api.js | 4 +--- www/js/menu.js | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'www/js') 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"), -- cgit v1.2.3-70-g09d2