Static is an open source web-based embedded radio player that uses webpack to generate a static page that can be hosted as a GitHub Page.
You can submit radio stations from YouTube as Pull Requests, or fork this repo to create your own playlist.
There is a hidden iframe that switches between different URLs for embedded live streams from YouTube based on the station you select. The code here hooks in to an unofficial API in YouTube that allows you to pause a stream.
Some browsers block automatic playing of videos. You may have to go to YouTube to enable autoplay to get Static to work.
The backgrounds are videos from giphy that are loaded in a video element in the background.
Update the streams JSON in src/data to listen to your preferred live streams. It currently only works with YouTube.
Update the backgrounds JSON in src/data to select relaxing animations to have in the background. Note that they are played at 50% speed to make them even more relaxing.
The page UI is implemented in src/App.svelte; Vite compiles it with the existing player code into the static dist directory. Run npm run local to start the development server, or npm run preview to serve the production build.
From the root of this repo:
npm install
npm run lint
npm run build
npm run localAGPLv3