From 86d70ba573286267f7f4fe22ffe1e392db58a0ea Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sat, 7 Sep 2013 21:21:14 -0400 Subject: fix minor bugs, add opus warn --- www/js/api.js | 2 +- www/js/html5ks.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'www/js') diff --git a/www/js/api.js b/www/js/api.js index 4d746a5..869b1cf 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -55,7 +55,7 @@ window.html5ks.api = { audio.src = src + ".opus"; } else if (Modernizr.audio.ogg) { audio.src = src + ".ogg"; - } else if (Modernizr.audio.aac) { + } else if (Modernizr.audio.m4a) { audio.src = src + ".m4a"; } else if (Modernizr.audio.wav) { audio.src = src + ".wav"; diff --git a/www/js/html5ks.js b/www/js/html5ks.js index 502ca75..9ca2bde 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -192,6 +192,9 @@ window.html5ks = { if (/MSIE/.test(navigator.userAgent)) { document.getElementById("ie").style.display = "block"; } + if (!Modernizr.audio.opus) { + document.getElementById("opus").style.display = "block"; + } for (var i = 0; i < warns.length; i++) { if (window.getComputedStyle(warns[i]).getPropertyValue("display") !== "none") { warn.style.visibility = "visible"; -- cgit v1.2.3-70-g09d2