summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/api.js5
-rw-r--r--www/js/imachine.js2
2 files changed, 5 insertions, 2 deletions
diff --git a/www/js/api.js b/www/js/api.js
index e029413..74971ae 100644
--- a/www/js/api.js
+++ b/www/js/api.js
@@ -42,7 +42,6 @@ window.html5ks.api = new (function () {
if (el.canPlayType(type[0])) {
el.src = src + "." + type[1];
el.load();
- el.play();
return true;
}
}
@@ -51,6 +50,10 @@ window.html5ks.api = new (function () {
_nextType();
+ el.oncanplaythrough = function () {
+ el.play();
+ };
+
el.onerror = function (e) {
if (e.code === e.MEDIA_ERR_SRC_NOT_SUPPORTED) {
if (!_nextType()) {
diff --git a/www/js/imachine.js b/www/js/imachine.js
index 7a1f7de..968df84 100644
--- a/www/js/imachine.js
+++ b/www/js/imachine.js
@@ -56,7 +56,7 @@ html5ks.imachine = new (function () {
var cpy = inst.slice(0),
type = '',
next = null;
- el: while (type = cpy.shift()) {
+ el: while ((type = cpy.shift())) {
switch (type) {
case "if":
case "elif":