summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-02-25 17:28:50 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-02-25 17:28:50 -0500
commit7dc90523db9097b00c5f49ad9c9e3c4fb36719ce (patch)
treecff117789da644cf918fe8875808fbb2764670a7 /www/js
parentced7ede3cd0853c9954bda518aaf546d3a0e5389 (diff)
downloadhtml5ks-7dc90523db9097b00c5f49ad9c9e3c4fb36719ce.tar.xz
html5ks-7dc90523db9097b00c5f49ad9c9e3c4fb36719ce.zip
bleh more
Diffstat (limited to 'www/js')
-rw-r--r--www/js/api.js4
-rw-r--r--www/js/menu.js2
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"),