initial push
This commit is contained in:
59
etc/icecast2/web/auth.xsl
Normal file
59
etc/icecast2/web/auth.xsl
Normal file
@ -0,0 +1,59 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="header">Icecast2 Status</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="admin/">Administration</a></li>
|
||||
<li><a href="status.xsl">Server Status</a></li>
|
||||
<li><a href="server_version.xsl">Version</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<h2>Authorization Page</h2>
|
||||
<xsl:for-each select="source">
|
||||
<xsl:choose>
|
||||
<xsl:when test="listeners">
|
||||
<xsl:if test="authenticator">
|
||||
<div class="roundbox">
|
||||
<h3 class="mount">
|
||||
Mount Point <xsl:value-of select="@mount" />
|
||||
<xsl:if test="server_name">
|
||||
<small><xsl:value-of select="server_name" /></small>
|
||||
</xsl:if>
|
||||
</h3>
|
||||
<form class="alignedform" method="get" action="/admin/buildm3u">
|
||||
<p>
|
||||
<label for="name">Username: </label>
|
||||
<input id="name" name="username" type="text" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="password">Password: </label>
|
||||
<input id="password" name="password" type="password" />
|
||||
</p>
|
||||
<input type="hidden" name="mount" value="{@mount}" />
|
||||
<input type="submit" value="Login" />
|
||||
</form>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h3><xsl:value-of select="@mount" /> - Not Connected</h3>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
73
etc/icecast2/web/server_version.xsl
Normal file
73
etc/icecast2/web/server_version.xsl
Normal file
@ -0,0 +1,73 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="header">Server Information</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="admin/">Administration</a></li>
|
||||
<li><a href="status.xsl">Server Status</a></li>
|
||||
<li><a href="server_version.xsl">Version</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
|
||||
<div class="roundbox">
|
||||
<h3>Server Information</h3>
|
||||
<table class="yellowkeys">
|
||||
<tbody>
|
||||
<xsl:for-each select="/icestats">
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td><xsl:value-of select="location" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin</td>
|
||||
<td><xsl:value-of select="admin" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Host</td>
|
||||
<td><xsl:value-of select="host" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Version</td>
|
||||
<td><xsl:value-of select="server_id" /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<tr>
|
||||
<td>Download</td>
|
||||
<td><a href="https://icecast.org/download/">icecast.org</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Source code</td>
|
||||
<td><a href="https://icecast.org/download/#git">icecast.org/download/#git</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Documentation</td>
|
||||
<td><a href="https://icecast.org/docs/">icecast.org/docs</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Stream Directory</td>
|
||||
<td><a href="http://dir.xiph.org/index.php">dir.xiph.org</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Community</td>
|
||||
<td><a href="https://icecast.org/contact/">icecast.org/contact</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
24
etc/icecast2/web/status-json.xsl
Normal file
24
etc/icecast2/web/status-json.xsl
Normal file
@ -0,0 +1,24 @@
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:import href="xml2json.xslt"/>
|
||||
<xsl:output indent="no" omit-xml-declaration="yes" method="text" encoding="UTF-8" media-type="application/json"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
|
||||
<!-- override imported transform variable to enable output -->
|
||||
<xsl:variable name="output">true</xsl:variable>
|
||||
|
||||
<!-- hide certain nodes from all sources -->
|
||||
<xsl:template match="icestats/source/max_listeners"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/source/public"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/source/source_ip"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/source/slow_listeners"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/source/*[contains(name(), 'total_bytes')]"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/source/user_agent" ><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
|
||||
<!-- hide certain global nodes -->
|
||||
<xsl:template match="icestats/sources"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/clients"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/stats"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="icestats/listeners"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
<xsl:template match="node()[contains(name(), 'connections')]"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
167
etc/icecast2/web/status.xsl
Normal file
167
etc/icecast2/web/status.xsl
Normal file
@ -0,0 +1,167 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="header">Icecast2 Status</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="admin/">Administration</a></li>
|
||||
<li><a href="status.xsl">Server Status</a></li>
|
||||
<li><a href="server_version.xsl">Version</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
<!-- WARNING:
|
||||
DO NOT ATTEMPT TO PARSE ICECAST HTML OUTPUT!
|
||||
The web interface may change completely between releases.
|
||||
If you have a need for automatic processing of server data,
|
||||
please read the appropriate documentation. Latest docs:
|
||||
https://icecast.org/docs/icecast-latest/icecast2_stats.html
|
||||
-->
|
||||
</xsl:text>
|
||||
<!--mount point stats-->
|
||||
<xsl:for-each select="source">
|
||||
<xsl:choose>
|
||||
<xsl:when test="listeners">
|
||||
<div class="roundbox">
|
||||
<div class="mounthead">
|
||||
<h3 class="mount">Mount Point <xsl:value-of select="@mount" /></h3>
|
||||
<div class="right">
|
||||
<xsl:choose>
|
||||
<xsl:when test="authenticator">
|
||||
<a class="auth" href="/auth.xsl">Login</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="mountlist">
|
||||
<li><a class="play" href="{@mount}.m3u">M3U</a></li>
|
||||
<li><a class="play" href="{@mount}.xspf">XSPF</a></li>
|
||||
<!-- <li><a class="play" href="{@mount}.vclt">VCLT</a></li> -->
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mountcont">
|
||||
<xsl:if test="server_type and ((server_type = 'application/ogg') or (server_type = 'audio/ogg'))">
|
||||
<div class="audioplayer">
|
||||
<audio controls="controls" preload="none">
|
||||
<source src="{@mount}" type="{server_type}" />
|
||||
</audio>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<table class="yellowkeys">
|
||||
<tbody>
|
||||
<xsl:if test="server_name">
|
||||
<tr>
|
||||
<td>Stream Name:</td>
|
||||
<td><xsl:value-of select="server_name" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="server_description">
|
||||
<tr>
|
||||
<td>Stream Description:</td>
|
||||
<td><xsl:value-of select="server_description" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="server_type">
|
||||
<tr>
|
||||
<td>Content Type:</td>
|
||||
<td><xsl:value-of select="server_type" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="stream_start">
|
||||
<tr>
|
||||
<td>Stream started:</td>
|
||||
<td class="streamstats"><xsl:value-of select="stream_start" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="bitrate">
|
||||
<tr>
|
||||
<td>Bitrate:</td>
|
||||
<td class="streamstats"><xsl:value-of select="bitrate" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="quality">
|
||||
<tr>
|
||||
<td>Quality:</td>
|
||||
<td class="streamstats"><xsl:value-of select="quality" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="video_quality">
|
||||
<tr>
|
||||
<td>Video Quality:</td>
|
||||
<td class="streamstats"><xsl:value-of select="video_quality" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="frame_size">
|
||||
<tr>
|
||||
<td>Framesize:</td>
|
||||
<td class="streamstats"><xsl:value-of select="frame_size" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="frame_rate">
|
||||
<tr>
|
||||
<td>Framerate:</td>
|
||||
<td class="streamstats"><xsl:value-of select="frame_rate" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="listeners">
|
||||
<tr>
|
||||
<td>Listeners (current):</td>
|
||||
<td class="streamstats"><xsl:value-of select="listeners" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="listener_peak">
|
||||
<tr>
|
||||
<td>Listeners (peak):</td>
|
||||
<td class="streamstats"><xsl:value-of select="listener_peak" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="genre">
|
||||
<tr>
|
||||
<td>Genre:</td>
|
||||
<td class="streamstats"><xsl:value-of select="genre" /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="server_url">
|
||||
<tr>
|
||||
<td>Stream URL:</td>
|
||||
<td class="streamstats">
|
||||
<a href="{server_url}"><xsl:value-of select="server_url" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<tr>
|
||||
<td>Currently playing:</td>
|
||||
<td class="streamstats">
|
||||
<xsl:if test="artist">
|
||||
<xsl:value-of select="artist" /> -
|
||||
</xsl:if>
|
||||
<xsl:value-of select="title" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h3><xsl:value-of select="@mount" /> - Not Connected</h3>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
274
etc/icecast2/web/style.css
Normal file
274
etc/icecast2/web/style.css
Normal file
@ -0,0 +1,274 @@
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 0 25px 0 50px;
|
||||
background-color: #000;
|
||||
font-family: Verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #f8ef64;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #f8ef64;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #f8ef64;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #f8ef64;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 3em;
|
||||
color: #fff;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-family: Verdana, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 110%;
|
||||
color: #f8ef64;
|
||||
}
|
||||
|
||||
h1#header{
|
||||
padding: 10px 0px 10px 80px;
|
||||
background: transparent url(/icecast.png) no-repeat scroll left center;
|
||||
}
|
||||
|
||||
h3 small {
|
||||
color: #fff;
|
||||
font-size: 70%;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
form.alignedform label {
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 10em;
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
|
||||
form.alignedform input {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #f8ef64;
|
||||
background-color: #333;
|
||||
color: #f8ef64;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#menu {
|
||||
border-top: 3px solid #7B96C6;
|
||||
border-bottom: 3px solid #7B96C6;
|
||||
text-align: center;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
#menu ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#menu ul li {
|
||||
float: left;
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
}
|
||||
|
||||
#menu ul li a {
|
||||
font-family: Verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#menu ul li a:hover {
|
||||
color: #f8ef64;
|
||||
}
|
||||
|
||||
.roundbox {
|
||||
width: 90%;
|
||||
background-color: #656565;
|
||||
border-radius: 10px;
|
||||
padding: 15px 20px;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
.roundbox h3 {
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px groove #ACACAC;
|
||||
}
|
||||
|
||||
.roundbox table.yellowkeys tr td:last-child {
|
||||
color: #f8ef64;
|
||||
}
|
||||
|
||||
table.colortable {
|
||||
border-collapse: collapse;
|
||||
padding: 20px 0 20px 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
table.colortable td {
|
||||
border: 1px solid #000;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
table.colortable thead tr td {
|
||||
color: #656565;
|
||||
background: #f8ef64;
|
||||
border-color: white;
|
||||
}
|
||||
|
||||
.roundbox table.yellowkeys tr td {
|
||||
padding: 5px 5px 0 0;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.mounthead h3 {
|
||||
float: left;
|
||||
margin-bottom: 0px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.mountcont {
|
||||
border-top: 1px groove #ACACAC;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
ul.mountlist {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.mountlist li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
a.play {
|
||||
padding-left: 22px;
|
||||
margin-left: 25px;
|
||||
border: none;
|
||||
background: transparent url(/tunein.png) no-repeat scroll left center;
|
||||
background-size: auto 100%;
|
||||
}
|
||||
|
||||
a.auth {
|
||||
padding-left: 22px;
|
||||
margin-left: 25px;
|
||||
border: none;
|
||||
background: transparent url(/key.png) no-repeat scroll left top;
|
||||
background-size: auto 100%;
|
||||
}
|
||||
|
||||
/* Admin navigation */
|
||||
|
||||
ul.nav {
|
||||
margin: 0;
|
||||
padding: 5px 0 10px 0;
|
||||
clear: both;
|
||||
list-style: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul.nav li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
ul.nav li a {
|
||||
border: none;
|
||||
display: inline-block;
|
||||
padding: .2em .7em;
|
||||
margin-top: .2em;
|
||||
background-color: #333;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
ul.nav li a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
|
||||
#footer {
|
||||
border-top: 1px groove #ACACAC;
|
||||
margin-top: 20px;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
|
||||
body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.roundbox {
|
||||
width: auto;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.roundbox table.yellowkeys tr td {
|
||||
display: block;
|
||||
padding: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
.roundbox table.yellowkeys tr td:last-child {
|
||||
margin-bottom: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.scrolltable {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 320px) {
|
||||
|
||||
ul.nav, #menu ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.nav li, #menu ul li {
|
||||
float: none;
|
||||
}
|
||||
|
||||
ul.nav li a, #menu ul li a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.nav li + li, #menu ul li + li {
|
||||
border-top: 1px solid #ACACAC;
|
||||
}
|
||||
|
||||
a.play {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user