livekit-client 2.6.1 → 2.6.3

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -11,7 +11,9 @@
11
11
  # JavaScript/TypeScript client SDK for LiveKit
12
12
 
13
13
  <!--BEGIN_DESCRIPTION-->
14
+
14
15
  Use this SDK to add realtime video, audio and data features to your JavaScript/TypeScript app. By connecting to <a href="https://livekit.io/">LiveKit</a> Cloud or a self-hosted server, you can quickly build applications such as multi-modal AI, live streaming, or video calls with just a few lines of code.
16
+
15
17
  <!--END_DESCRIPTION-->
16
18
 
17
19
  ## Docs
@@ -22,7 +24,7 @@ Docs and guides at [https://docs.livekit.io](https://docs.livekit.io)
22
24
 
23
25
  > [!NOTE]
24
26
  > This is v2 of `livekit-client`. When migrating from v1.x to v2.x you might encounter a small set of breaking changes.
25
- > Read the [migration guide](https://docs.livekit.io/guides/migrate-from-v1/) for a detailed overview of what has changed.
27
+ > Read the [migration guide](https://docs.livekit.io/recipes/migrate-from-v1/) for a detailed overview of what has changed.
26
28
 
27
29
  ## Installation
28
30
 
@@ -69,16 +71,16 @@ await room.connect(...);
69
71
 
70
72
  ```typescript
71
73
  import {
74
+ LocalParticipant,
75
+ LocalTrackPublication,
72
76
  Participant,
73
77
  RemoteParticipant,
74
78
  RemoteTrack,
75
79
  RemoteTrackPublication,
76
80
  Room,
77
81
  RoomEvent,
78
- VideoPresets,
79
82
  Track,
80
- LocalTrackPublication,
81
- LocalParticipant
83
+ VideoPresets,
82
84
  } from 'livekit-client';
83
85
 
84
86
  // creates a new room with options
@@ -153,7 +155,7 @@ function handleDisconnect() {
153
155
 
154
156
  In order to connect to a room, you need to first create an access token.
155
157
 
156
- See [access token docs](https://docs.livekit.io/guides/access-tokens) for details
158
+ See [authentication docs](https://docs.livekit.io/home/get-started/authentication/) for details
157
159
 
158
160
  ### Handling common track types
159
161
 
@@ -306,7 +308,7 @@ setLogExtension((level: LogLevel, msg: string, context: object) => {
306
308
 
307
309
  ### RPC
308
310
 
309
- Perform your own predefined method calls from one participant to another.
311
+ Perform your own predefined method calls from one participant to another.
310
312
 
311
313
  This feature is especially powerful when used with [Agents](https://docs.livekit.io/agents), for instance to forward LLM function calls to your client application.
312
314
 
@@ -323,7 +325,7 @@ room.localParticipant?.registerRpcMethod(
323
325
  async (data: RpcInvocationData) => {
324
326
  console.log(`Received greeting from ${data.callerIdentity}: ${data.payload}`);
325
327
  return `Hello, ${data.callerIdentity}!`;
326
- }
328
+ },
327
329
  );
328
330
  ```
329
331
 
@@ -350,7 +352,7 @@ You may find it useful to adjust the `responseTimeout` parameter, which indicate
350
352
 
351
353
  #### Errors
352
354
 
353
- LiveKit is a dynamic realtime environment and calls can fail for various reasons.
355
+ LiveKit is a dynamic realtime environment and calls can fail for various reasons.
354
356
 
355
357
  You may throw errors of the type `RpcError` with a string `message` in an RPC method handler and they will be received on the caller's side with the message intact. Other errors will not be transmitted and will instead arrive to the caller as `1500` ("Application Error"). Other built-in errors are detailed in `RpcError`.
356
358
 
@@ -385,7 +387,9 @@ If you are targeting legacy browsers, but still want adaptiveStream functionalit
385
387
  Also when targeting legacy browsers, older than the ones specified in our browserslist target, make sure to transpile the library code to your desired target and include required polyfills with babel and/or corejs.
386
388
 
387
389
  <!--BEGIN_REPO_NAV-->
390
+
388
391
  <br/><table>
392
+
389
393
  <thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>
390
394
  <tbody>
391
395
  <tr><td>Realtime SDKs</td><td><a href="https://github.com/livekit/components-js">React Components</a> · <b>Browser</b> · <a href="https://github.com/livekit/components-swift">Swift Components</a> · <a href="https://github.com/livekit/client-sdk-swift">iOS/macOS/visionOS</a> · <a href="https://github.com/livekit/client-sdk-android">Android</a> · <a href="https://github.com/livekit/client-sdk-flutter">Flutter</a> · <a href="https://github.com/livekit/client-sdk-react-native">React Native</a> · <a href="https://github.com/livekit/rust-sdks">Rust</a> · <a href="https://github.com/livekit/node-sdks">Node.js</a> · <a href="https://github.com/livekit/python-sdks">Python</a> · <a href="https://github.com/livekit/client-sdk-unity-web">Unity (web)</a> · <a href="https://github.com/livekit/client-sdk-unity">Unity (beta)</a></td></tr><tr></tr>