A Phoenix LiveView-powered shared-file music collection player, for listening in sync with friends.
LiveCue is currently configured to use ZeroTier.
FLAC. (mp3 and m4a support is in progress.)
-
Clone repository:
$ git clone [email protected]:theoliverbros/live_cue.git <destination-directory>
-
cd
to the repository directory. -
Set values in
envs/.env.all
. -
Prepare and enter the environment:
$ devbox shell
-
Run initial setup:
$ devbox run setup
-
Open ports
4369
and9001
, TCP protocol, in your computer’s local software firewall. -
Connect to ZeroTier if not already connected.
-
If not already in the Devbox environment:
$ devbox shell
-
Start LiveCue:
$ ./start.sh
This opens and configures a
tmux
session, in whichcmus
(the audio player) andLiveCue
itself are run. -
Parse and process local music collection files:
iex> LiveCue.process_collection()
This step is only required on the first run and after music collection updates.
-
Visit
localhost:4000
in your web browser.Choose an album or track and press play!
To stop the app and close down related services:
- Press Ctrl+C twice in the LiveCue iex terminal.
- Type
:q
and press Return to quitcmus
. exit
to exit the cmus pane.exit
to exittmux
.
(Hopefully, the stopping process will soon be improved.)
Processing collection files into data for use by LiveCue is done in two main steps.
In this step, we obtain basic file and meta data from the music collection’s files, and store the result in the local database.
This step can be individually run in the Elixir interactive terminal:
iex> LiveCue.parse_collection_files()
In this step, we transform and apply keys for storage to the data generated in step 1, and store the result in the local database. The data generated in this step is read when the LiveCue browser-based interface is used.
This step can be individually run in the Elixir interactive terminal:
iex> LiveCue.store_collection_data()
As this step uses the data stored by step 1, the code for step 2 can be updated and re-run during development without having to re-parse the collection files, which is a relatively lengthy process.