Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9d2f34fa6 | ||
|
|
a7e514e135 | ||
|
|
799d8efabc | ||
|
|
0ce64e3c5c | ||
|
|
0255d0c7e1 | ||
|
|
3f23a53eae | ||
|
|
f86547e2c1 | ||
|
|
e06b76c838 | ||
|
|
09a35efcd4 | ||
|
|
1fa5e42120 | ||
|
|
20a606ff14 | ||
|
|
91b75a24f1 | ||
|
|
e63f35e284 | ||
|
|
18d32a775e | ||
|
|
404bd5867e | ||
|
|
6119c73d70 | ||
|
|
f68931f696 | ||
|
|
08b86039ac | ||
|
|
facc350751 | ||
|
|
3ff05416f2 |
@@ -0,0 +1,27 @@
|
||||
this program is released under the DWTW license
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the Do What Thou Wilt License.
|
||||
|
||||
Boundless Public License
|
||||
DO WHAT THOU WILT
|
||||
TO PUBLIC LICENSE
|
||||
|
||||
Version 2.55
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it in full or in part is allowed without any restrictions.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. Do what thou wilt shall be the whole of the Law.
|
||||
|
||||
DWTWL – a license with a single requirement: DO WHAT THOU WILT
|
||||
|
||||
The license provides more freedom than any other one (such as GPL or BSD) and does not require saving the license text on copying.
|
||||
|
||||
DWTWL – an accomplished and eligible license for free text, code and any other symbols (including the software, documentation and artwork).
|
||||
|
||||
The license does not contain a "no warranty" clause. DWTWL can be used in countries that do not legally acknowledge the transition to public domain.
|
||||
|
||||
Summary:
|
||||
|
||||
An author-creator gives their source code to the world for free, without becoming distracted by worldly thinking regarding how and why the others will use it.
|
||||
@@ -0,0 +1,13 @@
|
||||
dub techno shoutcast and icecast streams
|
||||
|
||||
http://is3.ussr.win/dubtech
|
||||
|
||||
under DWTWL 2.55 license
|
||||
|
||||
***
|
||||
|
||||
Radio stations you are trying to listen to are running on an unencrypted port (not 443). This is quite common and it's not technically necessary for radio stations to be encrypted but nowadays web browsers like Chrome have started disallowing unencrypted content to be shown in an otherwise encrypted websites.
|
||||
|
||||
Solution: click on the padlock icon to the left of the URL box and then from the drop down menu select the 'Site Settings' option, you can then scroll down to the 'Insecure content' option at the bottom of the page and select 'Allow', this will create an exception for the website and allow you to continue using the player as before.
|
||||
|
||||
Source: https://support.google.com/chrome/thread/29505473?hl=en&msgid=29673696
|
||||
+12
-12
@@ -1,16 +1,12 @@
|
||||
/**
|
||||
* anthrstlsht.css (another style sheet) v0.8
|
||||
* DWTWL 2.5 license: https://soundragon.su/license/license.html
|
||||
* DWTWL 2.55 license: https://soundragon.su/license/license.html
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Ubuntu, sans-serif;
|
||||
color: #222;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.container {
|
||||
@@ -41,16 +37,12 @@ h4 {
|
||||
|
||||
h5 {
|
||||
font-size: 0.7rem;
|
||||
-moz-text-shadow:0 0 10px #fff;
|
||||
-webkit-text-shadow:0 0 10px #fff;
|
||||
text-shadow:0 0 10px #fff;
|
||||
text-shadow:0 0 5px #888;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1.2rem;
|
||||
-moz-text-shadow: 0 0 10px #00afee;
|
||||
-webkit-text-shadow: 0 0 10px #00afee;
|
||||
text-shadow: 0 0 10px #00afee;
|
||||
text-shadow: 0 0 5px #888;
|
||||
}
|
||||
|
||||
hr {
|
||||
@@ -160,3 +152,11 @@ select,
|
||||
fieldset {
|
||||
margin-bottom: .1rem;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 181 KiB |
@@ -1,37 +1,12 @@
|
||||
<?php
|
||||
|
||||
echo "id:;:";
|
||||
|
||||
function getID($radioip,$radioport)
|
||||
{
|
||||
$open = fsockopen($radioip,$radioport,$errno,$errstr,'.5');
|
||||
if ($open) {
|
||||
fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n");
|
||||
stream_set_timeout($open,'1');
|
||||
$read = fread($open,255);
|
||||
$exploded = explode(",",$read);
|
||||
if(exploded[6] == '' || $exploded[6] == '</body></html>')
|
||||
{ $text = 'streaming'; } else { $text = $exploded[6]; }
|
||||
$id = str_replace("</body></html>","",$text);
|
||||
} else { return false; }
|
||||
fclose($open);
|
||||
return $id;
|
||||
}
|
||||
|
||||
$radioip = "93.100.61.75";
|
||||
$radioport = "8000";
|
||||
echo getID($radioip,$radioport).":;:";
|
||||
$radioip = "67.212.165.106";
|
||||
$radioport = "8144";
|
||||
echo getID($radioip,$radioport).":;:";
|
||||
$radioip = "173.236.30.162";
|
||||
$radioport = "8022";
|
||||
echo getID($radioip,$radioport).":;:";
|
||||
$radioip = "91.237.213.34";
|
||||
$radioport = "8008";
|
||||
echo getID($radioip,$radioport).":;:";
|
||||
$radioip = "79.120.39.202";
|
||||
$radioport = "9009";
|
||||
echo getID($radioip,$radioport);
|
||||
|
||||
?>
|
||||
$id_time = fopen("id_time.txt", "r") or die("Unable to open file");
|
||||
$lasttime = fread($id_time, filesize("id_time.txt"));
|
||||
fclose($id_time);
|
||||
if ((time() - $lasttime) > 55)
|
||||
include('id_fetch.php');
|
||||
else {
|
||||
$id_tags = fopen("id_tags.txt", "r") or die("Unable to open file");
|
||||
echo fread($id_tags, filesize("id_tags.txt"));
|
||||
fclose($id_tags);
|
||||
}
|
||||
?>
|
||||
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
// Shoutcast
|
||||
function getIDshout($radioip,$radioport,$postfix = "GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n") {
|
||||
$open = fsockopen($radioip,$radioport,$errno,$errstr,'.5');
|
||||
if ($open) {
|
||||
fputs($open,$postfix);
|
||||
stream_set_timeout($open,'1');
|
||||
$read = fread($open,255);
|
||||
$exploded = explode(",",$read);
|
||||
if ($exploded[6] == '' || $exploded[6] == '</body></html>') {
|
||||
$text = 'streaming'; } else { $text = $exploded[6]; }
|
||||
$id = str_replace("</body></html>","",$text);
|
||||
$id = str_replace(" (minimalmix.com)","",$id);
|
||||
} else { return false; }
|
||||
fclose($open);
|
||||
return $id;
|
||||
}
|
||||
// Icecast
|
||||
// https://stackoverflow.com/a/17109654
|
||||
function getIDice($streamingUrl, $interval, $offset = 0, $headers = true) {
|
||||
$needle = 'StreamTitle=';
|
||||
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';
|
||||
$opts = [
|
||||
'http' => [
|
||||
'method' => 'GET',
|
||||
'header' => 'Icy-MetaData: 1',
|
||||
'user_agent' => $ua,
|
||||
'timeout' => 3
|
||||
]
|
||||
];
|
||||
if (($headers = get_headers($streamingUrl)))
|
||||
foreach ($headers as $h)
|
||||
if (strpos(strtolower($h), 'icy-metaint') !== false && ($interval = explode(':', $h)[1]))
|
||||
break;
|
||||
$context = stream_context_create($opts);
|
||||
if ($stream = fopen($streamingUrl, 'r', false, $context)) {
|
||||
$buffer = stream_get_contents($stream, $interval, $offset);
|
||||
fclose($stream);
|
||||
if (strpos($buffer, $needle) !== false) {
|
||||
$title = explode($needle, $buffer)[1];
|
||||
return substr($title, 1, strpos($title, ';') - 2);
|
||||
} else
|
||||
return getMp3StreamTitle($streamingUrl, $interval, $offset + $interval, false);
|
||||
} else
|
||||
throw new Exception("Unable to open stream [{$streamingUrl}]");
|
||||
}
|
||||
// Anima Amoris
|
||||
function getIDanima($amoris) {
|
||||
$url = "http://amoris.sknt.ru/".$amoris."/stats.json";
|
||||
$headers = array('User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0');
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
|
||||
$data = curl_exec($ch);
|
||||
if (curl_errno($ch)) {
|
||||
curl_close($ch);
|
||||
return "unavailable";
|
||||
}
|
||||
curl_close($ch);
|
||||
$datajson = json_decode($data, true);
|
||||
if (!empty($datajson)) $data = $data["songtitle"];
|
||||
$data = strstr($data, 'songtitle":"');
|
||||
$data = substr($data, 12);
|
||||
if (substr($data, -11) == 'sknt.ru"});') $data = stristr($data, ' * amoris.sknt.ru"});', true);
|
||||
return $data;
|
||||
}
|
||||
|
||||
// first
|
||||
$tags = "id:;:";
|
||||
try {
|
||||
$tags .= getIDanima("dubtechno"); // Anima Amoris [DubTech]
|
||||
} catch (Exception $exfirst) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// second
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDanima("dubtechnomix"); // Anima Amoris [DubTech Mix]
|
||||
} catch (Exception $exsecond) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// third
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDshout("79.120.39.202","9009"); // Radio Caprice - Dub Techno
|
||||
} catch (Exception $exthird) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// fourth
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDice("https://listen5.myradio24.com/ddtradio", 19200); // Deep Dub Tech radio
|
||||
} catch (Exception $exfourth) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// fifth
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$fifthIDice = getIDice("http://94.130.113.214:8000/dubtechno", 19200); // Schizoid Dub Techno
|
||||
if (bin2hex($fifthIDice) == "fffe66202d20fffe52" || "fffe53202d20fffe53" ) $tags .= "online streaming";
|
||||
else $tags .= $fifthIDice;
|
||||
} catch (Exception $exfifth) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// sixth
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDice("http://78.47.31.164:8002/dub", 19200); // MABU Beatz Dub Techno
|
||||
} catch (Exception $exsixth) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// seventh
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDice("http://195.133.48.93:8000/MixCult_96kbps", 19200); // MixCult Deep Techno Radio
|
||||
} catch (Exception $exseventh) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// eighth
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDanima("minimal"); // Anima Amoris [MinimalDeepTech]
|
||||
} catch (Exception $exeighth) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// ninth
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDanima("deeptech"); // Anima Amoris [Deep Tech House]
|
||||
} catch (Exception $extenth) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// tenth
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDice("https://best-of-techno.stream.laut.fm/best-of-techno", 19200); // Best of techno
|
||||
} catch (Exception $extenth) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// eleventh
|
||||
$tags .= ":;:";
|
||||
try {
|
||||
$tags .= getIDshout("148.251.43.231","8750"); // Minimal Mix Radio
|
||||
} catch (Exception $exseventh) {
|
||||
$tags .= "unavailable";
|
||||
}
|
||||
// twelfth
|
||||
$tags .= ":;:";
|
||||
//try {
|
||||
// $tags .= getIDice("http://prem2.di.fm:80/dubtechno_hi?266a3dc03aaa30a0807d9062", 19200); // Digitally Imported Dub Techno
|
||||
//} catch (Exception $exninth) {
|
||||
$tags .= "unavailable (commercial)";
|
||||
//}
|
||||
$tags .= ":;:";
|
||||
|
||||
$id_tags = fopen("id_tags.txt", "w") or die("Unable to open file");
|
||||
fwrite($id_tags, $tags);
|
||||
fclose($id_tags);
|
||||
$curtime = time();
|
||||
$id_time = fopen("id_time.txt", "w") or die("Unable to open file");
|
||||
fwrite($id_time, $curtime);
|
||||
fclose($id_time);
|
||||
|
||||
echo $tags;
|
||||
?>
|
||||
+220
-50
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- https://github.com/zlaxy/dubtechradiopage -->
|
||||
<!-- https://gitlab.com/zlax/dubtechradiopage -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!--
|
||||
@@ -12,68 +12,238 @@ a8" `Y88 88 88 88P' "8a 88 a8P_____88 a8" "" 88P' "8a
|
||||
"8a, ,d88 "8a, ,a88 88b, ,a8" 88, "8b, ,aa "8a, ,aa 88 88
|
||||
`"8bbdP"Y8 `"YbbdP'Y8 8Y"Ybbd8"' "Y888 `"Ybbd8"' `"Ybbd8"' 88 88
|
||||
-->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:regular&subset=Latin,Cyrillic">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="description" content="dub techno radio">
|
||||
<meta name="keywords" content="dub techno radio,dub techno stream,dub techno radio stream,dubtechno radio,dub techno,dub,techno,tech,
|
||||
deep,deep techno,dubtechno,radio,web radio,webradio,stream,dubtech">
|
||||
<link rel="stylesheet" type="text/css" href="anthrstlsht.css">
|
||||
<title>dub tech</title>
|
||||
<style type="text/css">
|
||||
.container { display: table; height: 100vh; }
|
||||
.tabb { display: table-cell; vertical-align: middle; }
|
||||
body { background-color: #888; background: url(bk.jpg) repeat-y; }
|
||||
.container { display: table; height: 100vh; }
|
||||
.tabb { display: table-cell; vertical-align: middle; }
|
||||
body { background: url("bclp.gif") repeat;}
|
||||
</style>
|
||||
<!-- script by bodqhrohro -->
|
||||
<script type="text/javascript">
|
||||
function allID () {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'id.php');
|
||||
xhr.send(null);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
|
||||
xhr.responseText.split('\n').forEach(function(line) {
|
||||
var kvID = line.split(':;:');
|
||||
document.getElementById("first").innerHTML = kvID[1];
|
||||
document.getElementById("second").innerHTML = kvID[2];
|
||||
document.getElementById("third").innerHTML = kvID[3];
|
||||
document.getElementById("fourth").innerHTML = kvID[4];
|
||||
document.getElementById("fifth").innerHTML = kvID[5];
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
allID();
|
||||
setInterval(allID, 1e4);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body style="background-color:#222;">
|
||||
<div class="container">
|
||||
<table class="tabb">
|
||||
<tr><td>
|
||||
<h5 align="right"><b><a href="http://anima.sknt.ru">Anima Amoris [Dub Techno]</a><br>
|
||||
<a href="http://amoris.sknt.ru:8000">http://93.100.61.75:8000</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://amoris.sknt.ru:8000/;" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="first"></h6>
|
||||
<h5 align="right"><b><a href="http://anima.sknt.ru">Anima Amoris [Dub Techno]</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://amoris.sknt.ru/dubtechno">http://amoris.sknt.ru</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://amoris.sknt.ru/dubtechno" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="first"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://sursumcorda.ning.com">arctic dub (sursumcorda)</a><br>
|
||||
<a href="http://67.212.165.106:8144">http://67.212.165.106:8144</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://67.212.165.106:8144/;" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="second"></h6>
|
||||
<h5 align="right"><b><a href="http://anima.sknt.ru">Anima Amoris [DubTech Mix]</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://amoris.sknt.ru/dubtechnomix">http://amoris.sknt.ru</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://amoris.sknt.ru/dubtechnomix" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="second"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://dubtechno.com.br">Dub Techno Station</a><br>
|
||||
<a href="http://173.236.30.162:8022">http://173.236.30.162:8022</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://173.236.30.162:8022/stream" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="third"></h6>
|
||||
<h5 align="right"><b><a href="http://radcap.ru">Radio Caprice - Dub Techno</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://79.120.39.202:8002/dubtechno">http://79.120.39.202:8002/dubtechno</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://79.120.39.202:8002/dubtechno" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="third"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://electronicmusic.fm">electronicmusic.fm - Dub</a><br>
|
||||
<a href="http://91.237.213.34:8008">http://91.237.213.34:8008</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://91.237.213.34:8008/;" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="fourth"></h6>
|
||||
<h5 align="right"><b><a href="https://myradio24.com/ddtradio">Deep Dub Tech radio </a></b></h5>
|
||||
<h5 align="right"><b><a href="https://listen5.myradio24.com/ddtradio">https://listen5.myradio24.com/ddtradio</a></b></h5>
|
||||
</td><td><audio controls src="https://listen5.myradio24.com/ddtradio" preload="none"></audio></td><td>
|
||||
<h6 id="fourth"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://radcap.ru">Radio Caprice - Dub Techno</a><br>
|
||||
<a href="http://79.120.39.202:9009">http://79.120.39.202:9009</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://79.120.39.202:9009/;" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="fifth"></h6>
|
||||
<h5 align="right"><b><a href="http://schizoid.in/">Schizoid Dub Techno</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://94.130.113.214:8000/dubtechno">http://schizoid.in:8000/dubtechno</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://94.130.113.214:8000/dubtechno" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="fifth"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="https://mabu-beatz-radio.com/home/dub-techno/">MABU Beatz Dub Techno</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://78.47.31.164:8002/dub">http://78.47.31.164:8002/dub</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://78.47.31.164:8002/dub" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="sixth"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://http://mixcult.net">MixCult Deep Techno Radio</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://radio.mixcult.net:8000">http://radio.mixcult.net:8000</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://radio.mixcult.net:8000/MixCult_256kbps" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="seventh"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://anima.sknt.ru">Anima Amoris [Deep Techno]</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://amoris.sknt.ru/minimal">http://amoris.sknt.ru</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://amoris.sknt.ru/minimal" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="eighth"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://anima.sknt.ru">Anima Amoris [Deep Tech House]</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://amoris.sknt.ru/deeptech">http://amoris.sknt.ru</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://amoris.sknt.ru/deeptech" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="ninth"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="https://laut.fm/best-of-techno">Best of techno</a></b></h5>
|
||||
<h5 align="right"><b><a href="https://best-of-techno.stream.laut.fm/best-of-techno">https://laut.fm/best-of-techno</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="https://best-of-techno.stream.laut.fm/best-of-techno" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="tenth"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="https://minimalmix.com/">Minimal Mix Radio</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://orion.shoutca.st:8750">http://orion.shoutca.st:8750</a></b></h5>
|
||||
</td><td><audio controls preload="none"><source src="http://orion.shoutca.st:8750/stream" type="audio/mpeg"></audio></td><td>
|
||||
<h6 id="eleventh"></h6>
|
||||
</td></tr><tr><td>
|
||||
<h5 align="right"><b><a href="http://www.di.fm/dubtechno">Digitally Imported Dub Techno</a></b></h5>
|
||||
<h5 align="right"><b><a href="http://www.di.fm/dubtechno">http://prem2.di.fm/dubtechno_hi</a></b></h5>
|
||||
</td><td><audio controls src="http://prem2.di.fm:80/dubtechno_hi?266a3dc03aaa30a0807d9062" preload="none"></audio></td><td>
|
||||
<h6 id="twelfth"></h6>
|
||||
</td><td>
|
||||
</td></tr><tr><td colspan="3">
|
||||
<br><h4 align="center"><a href="https://is3.ussr.win/dubtech/reverberations_of_the_delayed_chords">reverberations of the delayed chords</a></h4>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
console.log("--- [SYSTEM] Audio Recovery v9 (Strict Mode) ---");
|
||||
|
||||
var audios = document.getElementsByTagName("audio");
|
||||
var active = null;
|
||||
|
||||
// НАСТРОЙКИ
|
||||
var STALL_THRESHOLD = 5; // Секунд замирания перед восстановлением
|
||||
var RECOVERY_COOLDOWN = 5000; // Пауза между попытками восстановления
|
||||
//var MAX_RETRIES = 10; // Сколько раз пытаться оживить трек, прежде чем сдаться
|
||||
|
||||
var monitorData = {};
|
||||
|
||||
function bind(el, type, fn) {
|
||||
if (el.addEventListener) el.addEventListener(type, fn, false);
|
||||
else if (el.attachEvent) el.attachEvent("on" + type, fn);
|
||||
}
|
||||
|
||||
function switchAudio(el) {
|
||||
if (active && active !== el) {
|
||||
// Если переключаемся на другой трек, старый просто ставим на паузу
|
||||
try { active.load(); } catch(e) {}
|
||||
// try { active.pause(); } catch(e) {}
|
||||
}
|
||||
active = el;
|
||||
}
|
||||
|
||||
for (var i = 0; i < audios.length; i++) {
|
||||
var audio = audios[i];
|
||||
audio._index = i;
|
||||
monitorData[i] = {
|
||||
lastTime: 0,
|
||||
stalledSince: 0,
|
||||
isUserPaused: true,
|
||||
lastRecoveryAttempt: 0,
|
||||
retryCount: 0
|
||||
};
|
||||
|
||||
// Событие: музыка реально начала играть
|
||||
bind(audio, "playing", function() {
|
||||
console.log(`[DEBUG] Поток пошел: №${this._index}`);
|
||||
monitorData[this._index].isUserPaused = false;
|
||||
monitorData[this._index].retryCount = 0; // Сбрасываем счетчик ошибок при успехе
|
||||
switchAudio(this);
|
||||
});
|
||||
|
||||
// Событие: нажата кнопка Play
|
||||
bind(audio, "play", function() {
|
||||
console.log(`[DEBUG] Нажат Play: №${this._index}`);
|
||||
monitorData[this._index].isUserPaused = false;
|
||||
switchAudio(this);
|
||||
});
|
||||
|
||||
// Событие: пауза
|
||||
bind(audio, "pause", function() {
|
||||
// Если в момент паузы была ошибка сети — это системная пауза
|
||||
if (this.error || (active === this && monitorData[this._index].stalledSince > 0)) {
|
||||
console.log(`[DEBUG] Системная пауза (сбой): №${this._index}`);
|
||||
monitorData[this._index].isUserPaused = false;
|
||||
} else {
|
||||
console.log(`[DEBUG] Пользователь поставил на паузу: №${this._index}`);
|
||||
monitorData[this._index].isUserPaused = true;
|
||||
}
|
||||
});
|
||||
|
||||
bind(audio, "error", function() {
|
||||
console.warn(`[DEBUG] Ошибка сети: №${this._index}`);
|
||||
monitorData[this._index].isUserPaused = false;
|
||||
});
|
||||
}
|
||||
|
||||
// ГЛАВНЫЙ МОНИТОР (проверка раз в секунду)
|
||||
setInterval(function() {
|
||||
if (!active) return; // Если ничего не играет, не тратим ресурсы
|
||||
|
||||
var now = new Date().getTime();
|
||||
var data = monitorData[active._index];
|
||||
|
||||
// Работаем ТОЛЬКО если пользователь НЕ ставил на паузу
|
||||
if (!data.isUserPaused) {
|
||||
|
||||
// 1. Проверяем, движется ли время (currentTime)
|
||||
if (Math.abs(data.lastTime - active.currentTime) < 0.1) {
|
||||
data.stalledSince += 1;
|
||||
} else {
|
||||
data.lastTime = active.currentTime;
|
||||
data.stalledSince = 0;
|
||||
}
|
||||
|
||||
// 2. Условие восстановления: замерло на X секунд ИЛИ возникла ошибка
|
||||
if (data.stalledSince >= STALL_THRESHOLD || active.error) {
|
||||
|
||||
// Защита от слишком частых перезагрузок и "мертвых" треков
|
||||
//if (now - data.lastRecoveryAttempt > RECOVERY_COOLDOWN && data.retryCount < MAX_RETRIES) {
|
||||
if (now - data.lastRecoveryAttempt > RECOVERY_COOLDOWN) {
|
||||
|
||||
//console.error(`[RECOVERY] Сбой трека №${active._index}. Попытка ${data.retryCount + 1}/${MAX_RETRIES}...`);
|
||||
console.error(`[RECOVERY] Сбой трека №${active._index}. Попытка ${data.retryCount + 1}...`);
|
||||
|
||||
data.lastRecoveryAttempt = now;
|
||||
data.stalledSince = 0;
|
||||
data.retryCount++;
|
||||
|
||||
try {
|
||||
// Важно: load() сбрасывает буфер и переподключается к серверу
|
||||
active.load();
|
||||
|
||||
// Небольшая задержка перед play, чтобы load() успел сработать
|
||||
setTimeout(function() {
|
||||
active.play().catch(function(e) {
|
||||
console.log("[RECOVERY] Браузер заблокировал автовоспроизведение (нужен клик)");
|
||||
});
|
||||
}, 300);
|
||||
} catch(e) {
|
||||
console.error("[RECOVERY] Ошибка при попытке перезапуска:", e);
|
||||
}
|
||||
//} else if (data.retryCount >= MAX_RETRIES) {
|
||||
// // Если трек не ожил после n попыток, перестаем его мучить, чтобы не было "прыжков"
|
||||
// if (active === active) {
|
||||
// console.error(`[RECOVERY] Трек №${active._index} признан мертвым. Остановка восстановления.`);
|
||||
// // Опционально: можно оставить как есть, чтобы пользователь сам переключил
|
||||
// active = null;
|
||||
// }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Если пользователь на паузе, обнуляем счетчик замирания
|
||||
data.stalledSince = 0;
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
function allID() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "id.php");
|
||||
xhr.send(null);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
var kv = xhr.responseText.split(":;:");
|
||||
var ids = ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"];
|
||||
for (var i = 0; i < ids.length; ++i) {
|
||||
document.getElementById(ids[i]).textContent = kv[i + 1];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
allID();
|
||||
setInterval(allID, 20000);
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!--
|
||||
88 88 88
|
||||
,d 88 88 88
|
||||
@@ -85,4 +255,4 @@ MM88MMM ,adPPYba, ,adPPYba, 88,dPPYba, ,adPPYb,88 88 88 88,dPPYba,
|
||||
"Y888 `"Ybbd8"' `"Ybbd8"' 88 88 `"8bbdP"Y8 `"YbbdP'Y8 8Y"Ybbd8"'
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user