Skip to content

A simple voip application built with SvelteKit, LiveKit, and TailwindCSS

Notifications You must be signed in to change notification settings

ItsMeBrianD/LiveKit-Svelte-Exploration

Repository files navigation

Livekit + Svelte = 🦾

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.

  1. Place the ip for the host you are running on into docker-compose.yml and config.json

    • (Hint: it goes in the command property for the sfu service)
  2. Generate an access token / secret pair

    1. At time of writing, this can be done with the following command:
      docker run --rm livekit/livekit-server generate-keys
    2. Place your access token into /secret/lk_access_token
    3. Place your secret key into /secret/lk_access_key
    4. Place both into /server-config.yml as a key value pair for keys (i.e. access_token: secret_key)
  3. 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 and npm run dev to start the sfu in docker, and the frontend in dev mode.
  4. 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.