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 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'www/js/api.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"); -- cgit v1.2.3-54-g00ecf