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

Compare changes

Choose any two refs to compare.

+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>
+1 -1
docker-compose.yml
···
liquidsoap:
container_name: autoradio-liquidsoap
-
image: docker.io/savonet/liquidsoap:v2.3.1
+
image: docker.io/savonet/liquidsoap:v2.4.0
restart: unless-stopped
command: ["/script.liq"]
depends_on: