You can add an audio stream to any channel by using the backgroundAudio property. This needs to be specified on the channel:

channels:
- number: 97
  name: Background Audio Example
  backgroundAudio: <https://example.com/audio.mp3>
  # any content can be used with background audio
  generator: test-pattern

What file types are supported?

Any audio format playable in Google Chrome should work if you’re using the Electron app. Otherwise I’d stick with MP3 to maximize compatibility. Under the hood we aren’t doing anything special to process the file; we’re just playing HTML5 Audio.

Streaming audio

Background music works best when it’s an internet radio stream. If you’re publishing your TVS instance to the public internet you’ll want to ask permission before hotlinking a radio stream into your channels. If you’re on a LAN or not publicly distributing your channel lineup though TVS works just the same as any media player would so I can’t imagine you’d run into any problems doing the following:

Running your own radio streams

I recommend Icecast and Liquidsoap to set up your own radio streams. You’ll want to have a dedicated server running a server operating system or virtual machine to stream from since there’s a good amount of setup involved and if you’re running a consumer version of Windows the streams may go down every now and then due to automatic updates. Ask me how I know 😗

If you’d prefer a graphical approach to streaming, you can use Winamp as a player and Shoutcast as the streaming server.

Playlists

We now support PLS files for audio playback. The entries in the playlist need to be accessible over HTTP. If you use Winamp or WACUP to generate a playlist and save it in the root directory where your music is located the generated paths will be relative to the playlist’s location. If you then copy that directory tree to your server it should work.

An example playlist is available in the placeholders directory.

Background Audio Options

  backgroundAudioOptions:
    volume: 0.9 # You can adjust the volume of the background audio per-channel
    # corsMitigation: true # If you're hosting the app on a server that doesn't support CORS you can enable this to disable audio processing. The filter effects won't work but the audio should play (if CORS is the issue)
    filterType: highpass # You can apply a filter to the audio; values are lowpass, highpass, bandpass, lowshelf, highshelf, peaking, notch, allpass
    filterFrequency: 1000 # The frequency of the filter in Hz
    # noise: 0.08 # You can add white noise to the audio too
    description: TVS SATCOM 2 # the station name
    nowPlayingUrl: <http://r2.pce.gcpw.us/status-json.xsl> # this depends on the provider
    nowPlayingProvider: icecast # we support icecast, azuracast and 3rd party providers such as `plaza-one`
    shufflePlaylist: true # if your backgroundAudio src is a .pls file, you can shuffle it by setting this flag