diff options
Diffstat (limited to 'app/index.php')
-rw-r--r-- | app/index.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/index.php b/app/index.php index 82b4791..8a6aff6 100644 --- a/app/index.php +++ b/app/index.php @@ -56,7 +56,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI } if (window.MistNative) { - MistNative.version("<?= explode("|", trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/version")))[0] ?>", "<?= trim(file_exists("/opt/spotify/build.txt") ? file_get_contents("/opt/spotify/build.txt") : "trunk") ?>"); + MistNative.version("<?= explode("|", trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/version")))[0] ?>", "<?= trim(file_exists($_SERVER['DOCUMENT_ROOT'] . "/build.txt") ? file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/build.txt") : (file_exists("/opt/spotify/build.txt") ? file_get_contents("/opt/spotify/build.txt") : "trunk")) ?>"); MistNative.userInfo(`<?= str_replace("`", "\\`", json_encode($_PROFILE)) ?>`); } </script> @@ -209,6 +209,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI if (name === "lyrics") showLyrics(); if (name === "search") name = "home"; if (name === "stella") name = "settings"; + if (name === "video") name = "settings"; Array.from(document.getElementById("navigation").contentDocument.getElementsByClassName("navigation-item")).map(i => i.classList.remove("active")); document.getElementById("navigation").contentDocument.getElementById(name).classList.add("active"); } catch (e) { @@ -456,6 +457,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI } playerDocument.getElementById("player-audio").onplay = () => { + document.getElementById("lyrics-page").contentWindow.updateVideo(); updateAndroidNotification(); if (window.preloadedGains[window.currentSongID]) { @@ -497,6 +499,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI } playerDocument.getElementById("player-audio").onpause = () => { + document.getElementById("lyrics-page").contentWindow.updateVideo(); + if (window.preloadedGains[window.currentSongID]) { try { window.currentNormalizationSource.disconnect(); |