The SOON_ FM 2.0 Player supports streaming music from the following serices:
Google Music
SoundCloud
To build the go
binary the following dependency libraries must be installed.
Ensure the following dependencies are installed:
- Pulse Audio:
brew install pulseaudio
Once instaalled you can setup your workspace.
- Make your
GOPATH
:mkdir -p ~/player/src/player
- Set your
GOPATH
: exportGOPATH=~/lightswatmsvc
- Set your
PATH
: exportPATH=$PATH:$GOPATH/bin
cd
into yoursrc
directory:cd $GOPATH/src/player
- Clone the source code:
git clone git@github.com:soon-fm/player.git .
- Build:
make build
A sfmplayer.darwin-x86_64
binary will be generated in your current woking directory.
A Raspbian ARM7 compatible binary can be built via docker:
docker run --rm -v `pwd`:/go/src/player registry.soon.build/sfm/player:rpxc
This will generate a sfmplayer.linux-arm7
binary in the current working directory.
The player responds to and emits certain events.
The sfmplayer
will connect to a remote web socket service and will subscribe
to the following event topics:
player:play
: Fired when a track should start playing.player:pause
: Fired to pause the player.player:resume
: Fired to resume player playback.player:stop
: Fired to stop the current track.
The player will emit the following events:
player:playing
: Fired when the player starts playing a track.player:paused
: Fired when the player has paued playing a trackplayer:resumed
: Fired when the player has resumed playing.player:stopped
: Fired when the player has finished playing a track.