| Server IP : 198.244.165.102 / Your IP : 216.73.216.218 [ Web Server : nginx/1.24.0 System : Linux modovh-ub-01 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : colleary ( 1011) PHP Version : 8.3.23 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/midwest/public_html/ |
Upload File : |
<?php
// player.php - simple standalone popup (not loading full WP)
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="robots" content="noindex">
<title>Radio - Live</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
background: #111;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
}
.title { font-size: 18px; margin-bottom: 15px; }
.status { font-size: 14px; opacity: 0.8; }
button {
margin-top: 20px;
padding: 10px 20px;
border: none;
border-radius: 30px;
background: #1e90ff;
color: #fff;
cursor: pointer;
font-weight: bold;
}
button:hover { background: #187bcd; }
</style>
</head>
<body>
<div class="title">Midwest Radio - Live Stream</div>
<div class="status" id="status">Starting stream...</div>
<button id="stopBtn" type="button">Stop Stream</button>
<script>
const STREAM_URL = "https://playerservices.streamtheworld.com/api/livestream-redirect/MIDWEST_RADIOAAC.aac";
// Create audio only in popup
let audio = new Audio(STREAM_URL);
audio.preload = "none";
// Start (user already clicked before opening popup)
audio.play().then(() => {
document.getElementById('status').textContent = "Stream is playing...";
}).catch((err) => {
console.log("Playback error:", err);
document.getElementById('status').textContent = "Click inside this window to start audio (browser blocked autoplay).";
});
document.getElementById('stopBtn').addEventListener('click', () => {
try {
audio.pause();
audio.removeAttribute("src");
audio.load();
} catch (e) {}
window.close();
});
// If user closes popup manually, stop stream
window.addEventListener("beforeunload", () => {
try {
audio.pause();
audio.removeAttribute("src");
audio.load();
} catch (e) {}
});
</script>
<script>
(function(){
var LS_OPEN = "mw_radio_popup_open";
var LS_CMD = "mw_radio_popup_cmd";
// Mark as open whenever popup loads
localStorage.setItem(LS_OPEN, "1");
// Listen for close command from the main site
window.addEventListener("storage", function(ev){
if (ev.key === LS_CMD) {
try { window.close(); } catch(e) {}
}
});
// When popup closes, clear open flag
window.addEventListener("beforeunload", function(){
try { localStorage.removeItem(LS_OPEN); } catch(e) {}
});
})();
</script>
</body>
</html>