        if (preload == "wait") {
                    // Let MOD know when preload is complete
                    player.addEventListener("canplay", function () {
                        alert("preload complete");
                        window.location = "data:,preloadcomplete";
                    });
                }
                player.load();
            } else {
                // Loop
                if (loop == "true") {
                    player.loop = true;
                } else {
          