An easy way to have a 24/7 audio stream of music.

Compare changes

Choose any two refs to compare.

+5 -4
.env.example
···
+
STREAM_NAME=Radio
+
STREAM_DESC=Our selection of music
+
STREAM_URL=https://google.com
+
STREAM_MOUNTPOINT=live
+
ICECAST_PORT=8000
ICECAST_SOURCE_PASSWORD=ASourcePassword
ICECAST_ADMIN_PASSWORD=AnAdminPassword
···
ICECAST_HOSTNAME=localhost
ICECAST_MAX_SOURCES=1
ICECAST_CHARSET=UTF-8
-
STREAM_NAME=Radio
-
STREAM_DESC=Our selection of music
-
STREAM_URL=https://google.com
-
STREAM_MOUNTPOINT=live
+1 -1
README.md
···
## Requirements
- docker
-
- docker-compose
+
- docker compose
- Some music
## Install
+5
style-status.css
···
margin-right: 0;
}
+
.audiooplayer .plyr__controls .plyr__controls__item.plyr__time {
+
flex-grow: 1;
+
text-align: left;
+
}
+
#footer {
border-top: 1px groove #ACACAC;
font-size: 80%;
+12 -14
status.xsl
···
let lastTitle = ''
// Store the current mount point
let currentMount = ''
-
// Store the last notification
-
let lastNotification = null
// On every audio element, create a new Plyr instance
document.querySelectorAll('div[data-mount]').forEach((e) => {
···
// If we have permission, send a notification
if ('Notification' in window && Notification.permission === 'granted') {
-
lastNotification = new Notification(
+
const lastNotification = new Notification(
'RRM - Now Playing',
{
body: j.icestats.source.title,
icon: 'https://rita.moe/rita-icon.png',
renotify: true,
-
requireInteraction: false,
+
requireInteraction: true,
+
silent: true,
tag: 'now-playing',
}
)
+
+
// Close the notification after 10 seconds, as renotify
+
// isn't working perfectly when the track changes
+
setTimeout(
+
(_) => {
+
lastNotification.close()
+
},
+
10000
+
)
}
}
} else {
···
if ('Notification' in window && Notification.permission === 'default') {
Notification.requestPermission()
}
-
-
document.addEventListener(
-
'visibilitychange',
-
() => {
-
// If the page is visible, close the last notification
-
if (document.visibilityState === 'visible') {
-
lastNotification?.close()
-
}
-
}
-
)
]]>
</script>
</body>
+15 -5
script.liq
···
#!/usr/bin/liquidsoap
+
# This is the EU R128 standard
+
settings.lufs.track_gain_target := -23.
+
# Enable LUFS compute if missing from files
+
enable_lufs_track_gain_metadata()
+
+
# Enable the autocue metadata resolver
+
enable_autocue_metadata()
+
# Playlist
i_playlist = crossfade(
duration=3.0,
···
start_blank=true,
max_blank=1.0,
threshold=-45.0,
-
playlist(
-
mode="randomize",
-
reload=1,
-
reload_mode="rounds",
-
"/music"
+
normalize_track_gain(
+
playlist(
+
mode="randomize",
+
reload=1,
+
reload_mode="rounds",
+
"/music"
+
)
)
)
)