Improve player
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 29 Mar 2015 09:47:50 +0000 (12:47 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 29 Mar 2015 09:47:50 +0000 (12:47 +0300)
player.js

index bccc451f30b9559a63300dd68de7f46007425ca8..b91435e46c6e187492fc46629377895c230ecc29 100644 (file)
--- a/player.js
+++ b/player.js
@@ -41,9 +41,10 @@ window.onload = function () {
        details = document.getElementById("details");
        start = document.getElementById("start_player");
 
-       data = JSON.parse(document.getElementById("json").innerHTML);
+       data = JSON.parse(document.getElementById("json").textContent);
 
        audio.style.display = "none";
        audio.addEventListener('ended', play_random);
+       audio.addEventListener('error', play_random);
        start.addEventListener('click', play_random);
 };
This page took 0.011297 seconds and 4 git commands to generate.