From 6c26d2c37d9e2bf9c9f4bfb95078486d0c9d2c4c Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 17 Feb 2014 09:28:14 -0500 Subject: attach event handlers before setting src in loadMedia --- www/js/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'www') diff --git a/www/js/api.js b/www/js/api.js index 4eef78a..79b735e 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -51,8 +51,6 @@ window.html5ks.api = { html5ks.spin(1); - _nextType(); - el.oncanplaythrough = function () { el.play(); html5ks.spin(-1); @@ -67,6 +65,8 @@ window.html5ks.api = { console.error("unknown audio error"); } }; + + _nextType(); }, play: function (channel, name, ignore, fade) { -- cgit v1.2.3-70-g09d2