* audio connection quality mos for publisher stats Signed-off-by: shishir gowda <shishir@livekit.io> * Update tests Signed-off-by: shishir gowda <shishir@livekit.io> * Change ratings range, increase default rtt to 80 Signed-off-by: shishir gowda <shishir@livekit.io> * Use stats worker to get total packets to find %lost in window Signed-off-by: shishir gowda <shishir@livekit.io> * Update go dep Signed-off-by: shishir gowda <shishir@livekit.io> * Increase interval of score cal to 5 seconds Signed-off-by: shishir gowda <shishir@livekit.io> * use lastSequenceNumber in reports to find total packets Signed-off-by: shishir gowda <shishir@livekit.io> * Account for delay while calculating scores Signed-off-by: shishir gowda <shishir@livekit.io> * Fix minor typo Signed-off-by: shishir gowda <shishir@livekit.io> * Add connection stats/score to subscribed audio tracks Signed-off-by: shishir gowda <shishir@livekit.io> * Cleanup Signed-off-by: shishir gowda <shishir@livekit.io> * Ignore duplicate LastSequenceNumbers in rtcp reports Ignore if sequence number is less than what was recieved Signed-off-by: shishir gowda <shishir@livekit.io> * Move video track score calc to media/downtracks Signed-off-by: shishir gowda <shishir@livekit.io> * Deprecate SubscribeLossPercentage() as score calc is now handled downstream Signed-off-by: shishir gowda <shishir@livekit.io> * Initialize connection score to excellent score is calc at 5sec interval. Client fetches score before first score is computed * Update test cases for connection quality Signed-off-by: shishir gowda <shishir@livekit.io>
LiveKit - Open source, distributed video/audio rooms over WebRTC
LiveKit is an open source project that provides scalable, multi-user conferencing over WebRTC. It's designed to give you everything you need to build real time video/audio capabilities in your applications.
Features
- Horizontally scalable WebRTC Selective Forwarding Unit (SFU)
- Modern, full-featured client SDKs for JS, iOS, Android, and Flutter
- Built for production - JWT authentication and server APIs
- Robust networking & connectivity, over UDP & TCP
- Easy to deploy - pure Go & single binary
- Advanced features - speaker detection, simulcast, selective subscription, moderation APIs, and webhooks.
Documentation & Guides
Docs & Guides at: https://docs.livekit.io
Try it live
Head to our playground and give it a spin. Build a Zoom-like conferencing app in under 100 lines of code!
SDKs & Tools
Client SDKs:
Server SDKs:
- Javascript (docs)
- Go (docs)
Tools:
Installing
From source
Pre-requisites:
- Go 1.15+ is installed
- GOPATH/bin is in your PATH
Then run
git clone https://github.com/livekit/livekit-server
cd livekit-server
./bootstrap.sh
mage
Docker
LiveKit is published to Docker Hub under livekit/livekit-server
Running
Creating API keys
LiveKit utilizes JWT based access tokens for authentication to all of its APIs. Because of this, the server needs a list of valid API keys and secrets to validate the provided tokens. For more, see Access Tokens guide.
Generate API key/secret pairs with:
./bin/livekit-server generate-keys
or
docker run --rm livekit/livekit-server generate-keys
Store the generate keys in a YAML file like:
APIwLeah7g4fuLYDYAJeaKsSE: 8nTlwISkb-63DPP7OH4e.nw.J44JjicvZDiz8J59EoQ+
Starting the server
In development mode, LiveKit has no external dependencies. You can start LiveKit by passing it the API keys it should use
in LIVEKIT_KEYS. LiveKit could also use a config file or config environment
variable LIVEKIT_CONFIG
LIVEKIT_KEYS="<key>: <secret>" ./bin/livekit-server --dev
or
docker run --rm \
-p 7880:7880 \
-p 7881:7881 \
-p 7882:7882/udp \
-e LIVEKIT_KEYS="<key>: <secret>" \
livekit/livekit-server \
--dev \
--node-ip=<machine-ip>
When running with docker, --node-ip needs to be set to your machine's IP address. If the service is to be exposed to
public internet, this should the machine's public IP.
The --dev flag turns on log verbosity to make it easier for local debugging/development
Creating a JWT token
To create a join token for clients, livekit-server provides a convenient subcommand to create a development token. This token has an expiration of a month, which is useful for development & testing, but not appropriate for production use.
./bin/livekit-server --key-file <path/to/keyfile> create-join-token --room "myroom" --identity "myidentity"
Sample client
To test your server, you can use our example web client (built with our React component)
Enter generated access token and you are connected to a room!
Deploying for production
LiveKit is deployable to any environment that supports docker, including Kubernetes and Amazon ECS.
See deployment docs at https://docs.livekit.io/guides/deploy
Contributing
We welcome your contributions to make LiveKit better! Please join us on Slack to discuss your ideas and/or submit PRs.
License
LiveKit server is licensed under Apache License v2.0.