Files
Streaming/templates/player.html
2023-04-01 22:20:53 +02:00

98 lines
3.4 KiB
HTML
Executable File

<!DOCTYPE html>
<html data-theme="dark">
<head>
<script async defer data-website-id="ec75bcbd-29d7-471c-a1a8-c20cb688f2b6" src="https://umami.brn.systems/umami.js"></script>
<script src=assets/jquery.js> </script>
<meta charset="UTF-8">
<link rel="stylesheet" href="assets/pico.css">
<title>__LOCALIZATION_PLAYER_TITLE__</title>
<script>
__LOCALIZATION_LANGSELECT_SCRIPT__
function getCookie(cname) {
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i <ca.length; i++) {
let c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
$(document).ready(function(){
function Getc() {
$.get("index.php?chat=1", function(data, status){
$("#chatbox").val(data);
});
}
Getc();
setInterval(function(){ Getc(); }, 5000);
function Ping() {
$.get("index.php?keepalive=1", function(data, status){
});
}
Ping();
setInterval(function(){ Ping(); }, 60000);
$("#send").click(function(){
data = $("#ins").val();
Getc();
if(data != ""){
try{
umami.trackEvent('Send chat message', { type: 'chatmessage', code: kod});
} catch(e) {}
$.post("index.php?chat=1&send=1",
{
text: data
},
function(data2, status){
var chatmsgs = $("#chatbox").val();
chatmsgs = chatmsgs + '• ' + '__LOCALIZATION_CHAT_SENDING__' + "\n";
$("#chatbox").val(chatmsgs);
});
}
$("#ins").val("");
});
$("#ins").keyup(function(event) {
if (event.keyCode === 13) {
$("#send").click();
}
});
});
</script>
<style>
.headingac {
font-size: 64px;
}
</style>
</head>
<body>
__LOCALIZATION_LANGSELECT__
<p class="headingac">__LOCALIZATION_PLAYER_TITLE__</p>
<audio controls src="__VLOZ_URL_AUDIA__" id="audioplayer" type="__VLOZ_TYP_AUDIA__" preload="none"></audio>
<br>
<a href="index.php?logout=1">
<p>__LOCALIZATION_LOGOUT__</p>
</a>
<a href="__VLOZ_URL_AUDIA__.m3u" download target="_blank">
<p>__LOCALIZATION_PLAYLIST_DOWNLOAD__</p>
</a>
__VLOZ_ADMIN_LINK__
<div id="chat">
<textarea rows=5 id="chatbox" readonly></textarea><br>
<input id="ins" placeholder="__LOCALIZATION_CHAT_PLACEHOLDER__"></input>
<button id="send">__LOCALIZATION_CHAT_SEND__</button>
</div>
<p>© BRN Systems __VLOZ_ROK__</p>
</body>
</html>