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

Compare changes

Choose any two refs to compare.

+1
.env.example
··· 4 4 ICECAST_RELAY_PASSWORD=APasswordForRelaysIGuess 5 5 ICECAST_HOSTNAME=localhost 6 6 ICECAST_MAX_SOURCES=1 7 + ICECAST_CHARSET=UTF-8 7 8 STREAM_NAME=Radio 8 9 STREAM_DESC=Our selection of music 9 10 STREAM_URL=https://google.com
+2 -2
docker-compose.yml
··· 3 3 services: 4 4 icecast: 5 5 image: docker.io/mkody/icecast:latest 6 - restart: always 6 + restart: unless-stopped 7 7 ports: 8 8 - "${ICECAST_PORT:-8000}:8000" 9 9 environment: ··· 19 19 20 20 liquidsoap: 21 21 image: docker.io/savonet/liquidsoap:v2.2.2 22 - restart: always 22 + restart: unless-stopped 23 23 command: ["/script.liq"] 24 24 environment: 25 25 - ICECAST_SOURCE_PASSWORD
+5
style-status.css
··· 131 131 margin-right: 0; 132 132 } 133 133 134 + .audiooplayer .plyr__controls .plyr__controls__item.plyr__time { 135 + flex-grow: 1; 136 + text-align: left; 137 + } 138 + 134 139 #footer { 135 140 border-top: 1px groove #ACACAC; 136 141 font-size: 80%;
+12 -14
status.xsl
··· 78 78 let lastTitle = '' 79 79 // Store the current mount point 80 80 let currentMount = '' 81 - // Store the last notification 82 - let lastNotification = null 83 81 84 82 // On every audio element, create a new Plyr instance 85 83 document.querySelectorAll('div[data-mount]').forEach((e) => { ··· 141 139 142 140 // If we have permission, send a notification 143 141 if ('Notification' in window && Notification.permission === 'granted') { 144 - lastNotification = new Notification( 142 + const lastNotification = new Notification( 145 143 'RRM - Now Playing', 146 144 { 147 145 body: j.icestats.source.title, 148 146 icon: 'https://rita.moe/rita-icon.png', 149 147 renotify: true, 150 - requireInteraction: false, 148 + requireInteraction: true, 149 + silent: true, 151 150 tag: 'now-playing', 152 151 } 153 152 ) 153 + 154 + // Close the notification after 10 seconds, as renotify 155 + // isn't working perfectly when the track changes 156 + setTimeout( 157 + (_) => { 158 + lastNotification.close() 159 + }, 160 + 10000 161 + ) 154 162 } 155 163 } 156 164 } else { ··· 171 179 if ('Notification' in window && Notification.permission === 'default') { 172 180 Notification.requestPermission() 173 181 } 174 - 175 - document.addEventListener( 176 - 'visibilitychange', 177 - () => { 178 - // If the page is visible, close the last notification 179 - if (document.visibilityState === 'visible') { 180 - lastNotification?.close() 181 - } 182 - } 183 - ) 184 182 ]]> 185 183 </script> 186 184 </body>