This webservice connects to a given Icecast radio stream, extracts Icy audio metadata if available, and emits parts of the audio metadata as FCM message to registered clients.
This project is work in progress.
- Install dependencies from package.json:
npm install
- Set environment variable to absolute URL of Icecast audio stream:
export RADIO_STREAM_URL=https://xyz/live
- Set environment variables to configure user-agent of this app when accessing metadata APIs:
export USER_AGENT_APPLICATION=app-Name
export USER_AGENT_OWNER=owner-url
- Provide configuration options to use Google Cloud Storage as image file cache:
GOOGLE_APPLICATION_CREDENTIALS
: Service account config for your Google Cloud Project.GCLOUD_PROJECT
: Google Cloud Project ID. Must matchproject_id
as found in the service account config file.CLOUD_BUCKET
: Globally unique ID of existing Google Cloud Storage bucket.SALT
: Salt for generating image cache keys that cannot be replicated.export GOOGLE_APPLICATION_CREDENTIALS=./service-account.json export GClOUD_PROJECT=project-id export CLOUD_BUCKET=bucket-id export SALT=crypto-salt
- Set environment variables to define Firebase message subscription topic:
RADIO_STATION_KEY
: Topic identifier of the streamed radio station.RADIO_STATION_NAME
: Human-readable name of the streamed radio station.export RADIO_STATION_KEY=xyz export RADIO_STATION_NAME='Station XYZ'
- Start the server:
npm start