Le M3U fonctionne mieux, le player est moins gangé tout comme la config
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Antoine Bartuccio 2021-07-04 15:29:10 +02:00
parent 42bd4abdee
commit ef6ee2e3c6
4 changed files with 25 additions and 17 deletions

View File

@ -6,6 +6,8 @@ export max_listeners=${MAX_LISTENERS:=30}
export admin_user=${ADMIN_USER:=admin}
export admin_password=${ADMIN_PASSWORD:=admin}
m3u=${M3U:="http://${hostname}:${port}/radio-bullshit"}
pass_gen="python3 -c 'import secrets, string; print(\"\".join((secrets.choice(string.ascii_letters + string.digits) for i in range(20))))'"
export source_username=$(eval $pass_gen)
@ -14,6 +16,8 @@ export source_password=$(eval $pass_gen)
j2 ices.xml.jinja > ices.xml
j2 icecast.xml.jinja > icecast.xml
echo ${m3u} > /usr/share/icecast2/web/radio-bullshit.m3u
runuser -l zambla -c 'icecast2 -c /config/icecast.xml &'
/opt/ultrasync.sh &
runuser -l zambla -c 'ices2 /config/ices.xml'

View File

@ -1,6 +1,6 @@
<icecast>
<location>Earth</location>
<admin>icemaster@localhost</admin>
<admin>icemaster@{{ hostname }}</admin>
<limits>
<clients>100</clients>
@ -21,13 +21,14 @@
<hostname>{{ hostname }}</hostname>
<http-headers>
<header name="Access-Control-Allow-Origin" value="*" />
<header name="X-Robots-Tag" value="index, noarchive" />
</http-headers>
<listen-socket>
<port>{{ port }}</port>
</listen-socket>
<http-headers>
<header name="Access-Control-Allow-Origin" value="*" />
</http-headers>
<mount type="normal">
<mount-name>/radio-bullshit</mount-name>
@ -36,18 +37,9 @@
<password>{{ source_password }}</password>
<max-listeners>{{ max_listeners }}</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/example_intro.ogg</intro>
<hidden>1</hidden>
<public>1</public>
<http-headers>
<header name="Access-Control-Allow-Origin" value="http://webplayer.example.org" />
<header name="baz" value="quux" />
</http-headers>
</mount>
<fileserve>1</fileserve>

View File

@ -15,6 +15,7 @@
<username>{{ source_username }}</username>
<password>{{ source_password }}</password>
<mount>/radio-bullshit</mount>
<port>{{ port }}</port>
</instance>
</stream>
</ices>

View File

@ -1,11 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Radio bullshit, la radio du paradis !</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
</head>
<body>
<audio controls>
<source src="/radio-bullshit" type="audio/ogg">
<audio controls autoplay preload="none">
<source src="/radio-bullshit?type=.ogg/;" type="application/ogg">
</audio>
<p>
<ul>
<li><a href="/radio-bullshit">VLC Stream</a></li>
<li><a href="/radio-bullshit.m3u">M3U file</a></li>
</ul>
</p>
</body>
</html>
</html>