This repo contains a small VOIP application built using SvelteKit, LiveKit and TailwindCSS.
To get it set up, you only need to do a few short setup steps.
-
Place the ip for the host you are running on into
docker-compose.yml
andconfig.json
- (Hint: it goes in the
command
property for thesfu
service
)
- (Hint: it goes in the
-
Generate an access token / secret pair
- At time of writing, this can be done with the following command:
docker run --rm livekit/livekit-server generate-keys
- Place your access token into
/secret/lk_access_token
- Place your secret key into
/secret/lk_access_key
- Place both into
/server-config.yml
as a key value pair forkeys
(i.e.access_token: secret_key
)
- At time of writing, this can be done with the following command:
-
Run
docker-compose up
, and connect to the instance at localhost:3000- If you are going to be changing the svelte code, you can use
docker-compose up sfu
andnpm run dev
to start the sfu in docker, and the frontend in dev mode.
- If you are going to be changing the svelte code, you can use
-
If you are going to be connecting to a local instance (i.e. from one machine to another via LAN), you will need to configure your browser to allow the browser to access your microphone and camera on a specific insecure host. For Google Chrome, you can do so with this flag (it should look like
http://x.x.x.x:3000
). To read more about why this step is needed, the chromium project has a good writeup on why they made the restriction here.