Repository navigation
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
CRA is deprecated and Node 20 is end of life. Netlify now publishes dist/. REACT_APP_ env vars still work, so no Netlify change is needed for Sentry.
- Watch playback progress and reconnect with backoff when the stream stalls, errors or ends, failing over to the other stream after the first retry - Default to 128kbps when the browser doesn't report connection speed (Firefox and Safari were always getting 64kbps and no album art) - Fade with a Web Audio gain node, which also works on iOS - Resume a suspended AudioContext instead of playing silence - Reconnect the now playing SSE and resync from the JSON snapshot - Time the progress bar from the server's elapsed time and the audio buffer - Show unique listeners instead of connections - Add Media Session metadata and controls - Draw the visualizer outside React state, sharp on HiDPI, and respect prefers-reduced-motion - Replace FontAwesome, react-device-detect, react-page-visibility and store with small local equivalents
ubuntu-20.04 runners are retired, so the old workflow wasn't running.
The .sr-only class used to come from FontAwesome's injected CSS, so removing FontAwesome made the hidden labels in the song history and nav visible.
ahmaxed
force-pushed
the
feat/modernize-player
branch
from
November 13, 2026 14:16
0af9779 to
c3d6eb1
Compare
huyenltnguyen
approved these changes
Nov 13, 2026
| @@ -1 +1 @@ | |||
| 20.19.0 | |||
| 24 | |||
Member
There was a problem hiding this comment.
We might as well bump node to v26 here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #301. This also covers what #315 set out to do, so that one can probably be closed.
Why
Listeners have been reporting that Code Radio cuts out every now and then. Most of that was on the server side (the old Liquidsoap was dropping its feed at song changes, which is fixed by the AzuraCast upgrade we just switched to), but the client made it worse: when the stream stalled, the player just sat there in "playing" state with no sound until you hit pause and play again.
While I was in there I also found that Firefox and Safari users were always getting the 64kbps stream and no album art, because the "fast connection" check relied on
navigator.connection, which only exists in Chromium.On top of that the tooling had aged out. CRA is deprecated, Node 20 is end of life, and CI was pinned to
ubuntu-20.04runners that GitHub has retired, so the checks weren't actually running.What changed
Playback
play()calls (autoplay blocked) are handled instead of leaving the button stuck.Now playing
Code and tooling
createRoot, Node 24.useAudioPlayer, the metadata inuseNowPlaying, andApp.jsis down from 600 lines to about 50.prefers-reduced-motion. The background video does too.react-scripts,@sentry/tracing,react-device-detect,react-page-visibility,store, FontAwesome and the prop-types usage. Sentry uses the currentbrowserTracingIntegrationand samples 5% of traces instead of 100%.Before merging
netlify.tomlnow publishesdistand Node comes from.nvmrc. If aNODE_VERSIONenv var is set in the Netlify dashboard it'll override.nvmrc, so it's worth checking. The build image should be the current Ubuntu one, not focal.REACT_APP_SENTRY_DSNstill works, so nothing needs to change there.VITE_SENTRY_DSNis the new name if we want to rename it at some point.Testing
.sr-onlyused to come from FontAwesome's injected CSS, so it's now defined inApp.css. Without it, the hidden labels in the song history and nav were showing.Left for later
UA-55446531-21). UA has been shut down, so it can probably go, but that's a separate call.