UNPKG

homebridge-appletv-enhanced

Version:

Plugin that exposes the Apple TV to HomeKit with much richer features than the vanilla Apple TV implementation of HomeKit.

111 lines (107 loc) 3.82 kB
<!DOCTYPE html> <html lang="en"> <head> <title>Apple TV Pairing</title> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body { font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0; overflow: hidden; width: 100%; height: 100vh; } .bg-image { background-image: url(https://raw.githubusercontent.com/maxileith/homebridge-appletv-enhanced/main/static_html_content/background.jpg); background-position: center center; background-repeat: no-repeat; background-size: cover; height: calc(100vh + 60px); width: calc(100% + 60px); filter: blur(15px); -webkit-filter: blur(15px); position: absolute; top: -30px; left: -30px; opacity: 0.8; } .box { display: flex; align-items: center; justify-content: center; height: 100vh; width: 100%; position: absolute; top: 0; left: 0; } .box div { text-align: center; max-width: 20rem; margin-bottom: 5rem; background-color: rgba(255, 255, 255, 0.4); padding: 2rem; border-radius: 1rem; } #appleTVLogo { max-width: 10rem; } button { padding: 0.5rem; border: 0; width: 100%; height: 5rem; font-size: 1.5rem; border-radius: 0.75rem; background-color: rgba(0, 0, 0, 0.2); cursor: pointer; margin: 3.5rem 0 0.25rem 0; } </style> <script> let secondsLeft = 10; let countDownInterval = null; function showRetry() { document.getElementById("description").style.display = "none"; document.getElementById("retryButton").style.display = "block"; } function countDown() { secondsLeft--; document.getElementById("secondsLeft").innerHTML = secondsLeft; if (secondsLeft === 0) { clearInterval(countDownInterval); showRetry(); } } window.addEventListener("load", () => { document.getElementById("secondsLeft").innerHTML = secondsLeft; countDownInterval = setInterval(countDown, 1000); }); </script> </head> <body> <div class="bg-image"></div> <div class="box"> <div> <img src="https://raw.githubusercontent.com/maxileith/homebridge-appletv-enhanced/main/static_html_content/appleTVLogo.png" id="appleTVLogo" /> <h3>Back off timer: <span id="secondsLeft"></span> seconds</h3> <p id="description"> Too many unsuccessful pairing attempts have been made. Wait until the Apple TV accepts new pairing requests. </p> <button id="retryButton" style="display: none" onClick="window.location.reload();" > Tap to retry </button> </div> </div> </body> </html>