summaryrefslogtreecommitdiff
path: root/www/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/api.js')
-rw-r--r--www/js/api.js5
1 files changed, 4 insertions, 1 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()) {