Skip to content

Commit b84a2be

Browse files
lukasIOmdo
andauthored
Update readmes (#222)
* update root readme * add disclaimer * add image * add FAQ * Add linked logo to top of readme * Image optimization Co-authored-by: Mark Otto <[email protected]>
1 parent 3956b85 commit b84a2be

File tree

6 files changed

+109
-17
lines changed

6 files changed

+109
-17
lines changed
-10 Bytes
Loading
416 KB
Loading
3.43 MB
Loading
-13 Bytes
Loading

.github/assets/livekit.svg

Lines changed: 1 addition & 0 deletions
Loading

README.md

Lines changed: 108 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,101 @@
1+
<a href="https://livekit.io"><img src="./.github/assets/livekit.svg" width="132" height="30" alt="LiveKit logo" /></a>
2+
3+
<br>
4+
15
# LiveKit Components
26

3-
Create your LiveKit experience without worrying about state.
7+
Create your [LiveKit](https://livekit.io) WebRTC experience without worrying about state.
48

5-
<!--NAV_START-->
9+
> **Disclaimer** This is project is in active development and open sourced as a developer preview. While APIs are unlikely to drastically change from here onwards, there's still the chance that some things might need tweaking after an update. We appreciate feedback from the community and are planning to incorporate your feedback to get to a stable version as soon as possible!
610
7-
## Monorepo Navigation
11+
![LiveKit Components Preview](./.github/assets/components-preview-grid.png)
812

9-
- [Home 👈](/README.md)
10-
- **Docs**
11-
- [Docs](/docs/alpha-docs/README.md)
12-
- [Storybook](/docs/storybook/README.md)
13-
- **Framework Implementations**:
14-
- [React](/packages/react/README.md)
15-
- **Examples**
16-
- [Next.js](/examples/nextjs/README.md)
17-
- **Internal Packages**
18-
- [Core](/packages/core/README.md)
19-
- [Styles](/packages/styles/README.md)
13+
## About LiveKit Components
2014

21-
<!--NAV_END-->
15+
LiveKit Components give you a declarative way to build your real-time LiveKit audio/video frontend with React.
16+
17+
Every use case is different and apps in the real world are individual and unique. We don't pretend to have the perfect solution that fits all use cases. Instead, we've taken an approach where we give you reasonable defaults, without taking away full control over each component if you want it.
18+
19+
### 🤩 LiveKit Components handle all state for you
20+
21+
You don't have to worry about participant or room events to update the state of your application. All components handle state management for you, and by using React contexts, you don't have to route properties through your component tree.
22+
23+
### 🛠️ Carefully crafted set of components
24+
25+
We offer all the necessary building blocks to build a live video or audio app in no time.
26+
27+
### 🚀 Beautiful and sane defaults
28+
29+
We put a lot of effort into creating components that work and look great right out of the gate. Get started quickly by using the defaults of your components or overwrite them by simply adding children.
30+
31+
```tsx
32+
//1️⃣ Use the components defaults to render a video conference app
33+
<LiveKitRoom token="my-token" serverUrl="wss://my-livekit-server" connect={true} >
34+
<VideoConference />
35+
</LiveKitRoom>
36+
37+
// 2️⃣ or overwrite the defaults with your custom component tree.
38+
<LiveKitRoom >
39+
<ParticipantLoop>
40+
{/* */}
41+
</ParticipantLoop>
42+
</LiveKitRoom>
43+
44+
```
45+
46+
### 🎨 Style them the way you want
47+
48+
Because most of the components are merely wrappers around standard HTML-Elements you can overwrite the basic component style how ever you want.
49+
50+
On top of that we provide a handful of pre-defined css variables to easily theme LiveKit Components to your needs.
51+
52+
### 📈 Room to grow: create your own components
53+
54+
The component we offer does not fit your requirements? We have the solution for you! Each component comes with its own React hook that allows you to create your own component with minimal boilerplate. Of course, you can also combine your own component with our pre-built components. It's common to start with our components to quickly sketch out a concept, and then replace some of them with your own components to build something we could never have imagined.
55+
56+
### Get started
57+
58+
The best way to get started is to use the [`@livekit/components-react`](/packages/react/) package and install it.
59+
60+
```bash
61+
yarn install @livekit/components-react
62+
```
63+
64+
Creating a full fledged video conference is as easy as
65+
66+
```tsx
67+
import { LiveKitRoom, VideoConference } from '@livekit/components-react';
68+
69+
export function App() {
70+
return (
71+
<LiveKitRoom token="<livekit-token>" serverUrl="<url-to-livekit-server>" connect={true}>
72+
<VideoConference />
73+
</LiveKitRoom>
74+
);
75+
}
76+
```
77+
78+
## Examples
79+
80+
We have a fully featured video conferencing application in our [examples](/examples/meet/) that powers https://meet.livekit.io.
81+
82+
Additionally there are some basic example on how to use and customize LiveKit Components in the [nextjs example folder](/examples/next/)
83+
84+
In order to set the examples up locally follow the [development guide](#development-setup).
85+
86+
## FAQ
87+
88+
### Why is there a @livekit/components-core package?
89+
90+
By abstracting most of the state handling logic into a common core we wanted to make sure that other framework implementations can be created with minimal code duplication. We chose observables as the main data structure for this core as its concepts translate really well to for example React's hooks, solid's signals, Svelte's stores, Vue's composables, and angular loves observables out of the box.
91+
92+
### Did you consider using Custom Elements?
93+
94+
Yes, we did consider building LK Components with custom elements (web components). We ultimately decided against it in order to give users the option to develop within the constraints of their chosen framework with all its specific concepts (e.g. in the case of react hooks, context etc.). That said the road towards supporting custom elements isn't entirely closed off. If the adoption of custom elements gains traction we can imagine providing a framework implementation that additionally compiles to custom elements (e.g. solid or svelte).
95+
96+
### Will there be an implementation for my favorite framework?
97+
98+
The highest priority is currently to get the core and react packages to a stable version that people love to work with. Once this is done we will decide on what other frameworks we might to support officially. If you want to develop an implementation for your favorite framework based on the core package we'd love to talk to you about it!
2299

23100
## Development Setup
24101

@@ -50,6 +127,20 @@ yarn dev:next
50127

51128
> **Note** for the examples to work you'll need to make sure to copy the the contents of .env.example in the specific example folder to a newly created .env.local file and adjust the values accordingly to your livekit server setup.
52129
53-
## Architecture Overview
130+
<!--NAV_START-->
54131

55-
![](./.github/assets/components-architecture.png)
132+
## Monorepo Navigation
133+
134+
- [Home 👈](/README.md)
135+
- **Docs**
136+
- [Docs](/docs/alpha-docs/README.md)
137+
- [Storybook](/docs/storybook/README.md)
138+
- **Framework Implementations**:
139+
- [React](/packages/react/README.md)
140+
- **Examples**
141+
- [Next.js](/examples/nextjs/README.md)
142+
- **Internal Packages**
143+
- [Core](/packages/core/README.md)
144+
- [Styles](/packages/styles/README.md)
145+
146+
<!--NAV_END-->

0 commit comments

Comments
 (0)