livekit-client 1.9.7 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/dist/livekit-client.esm.mjs +2550 -2140
  2. package/dist/livekit-client.esm.mjs.map +1 -1
  3. package/dist/livekit-client.umd.js +1 -1
  4. package/dist/livekit-client.umd.js.map +1 -1
  5. package/dist/src/api/SignalClient.d.ts +2 -1
  6. package/dist/src/api/SignalClient.d.ts.map +1 -1
  7. package/dist/src/index.d.ts +1 -0
  8. package/dist/src/index.d.ts.map +1 -1
  9. package/dist/src/proto/livekit_models.d.ts +108 -10
  10. package/dist/src/proto/livekit_models.d.ts.map +1 -1
  11. package/dist/src/proto/livekit_rtc.d.ts +513 -194
  12. package/dist/src/proto/livekit_rtc.d.ts.map +1 -1
  13. package/dist/src/room/Room.d.ts +3 -2
  14. package/dist/src/room/Room.d.ts.map +1 -1
  15. package/dist/src/room/events.d.ts +5 -1
  16. package/dist/src/room/events.d.ts.map +1 -1
  17. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  18. package/dist/src/room/participant/Participant.d.ts +2 -2
  19. package/dist/src/room/participant/Participant.d.ts.map +1 -1
  20. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  21. package/dist/src/room/participant/publishUtils.d.ts +8 -0
  22. package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
  23. package/dist/src/room/track/LocalTrack.d.ts +32 -0
  24. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  25. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  26. package/dist/src/room/track/RemoteTrackPublication.d.ts +4 -1
  27. package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
  28. package/dist/src/room/track/TrackPublication.d.ts +2 -1
  29. package/dist/src/room/track/TrackPublication.d.ts.map +1 -1
  30. package/dist/src/room/track/options.d.ts +1 -1
  31. package/dist/src/room/track/options.d.ts.map +1 -1
  32. package/dist/src/room/track/processor/types.d.ts +19 -0
  33. package/dist/src/room/track/processor/types.d.ts.map +1 -0
  34. package/dist/ts4.2/src/api/SignalClient.d.ts +2 -1
  35. package/dist/ts4.2/src/index.d.ts +1 -0
  36. package/dist/ts4.2/src/proto/livekit_models.d.ts +126 -12
  37. package/dist/ts4.2/src/proto/livekit_rtc.d.ts +617 -254
  38. package/dist/ts4.2/src/room/Room.d.ts +3 -2
  39. package/dist/ts4.2/src/room/events.d.ts +5 -1
  40. package/dist/ts4.2/src/room/participant/Participant.d.ts +2 -2
  41. package/dist/ts4.2/src/room/participant/publishUtils.d.ts +8 -0
  42. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +32 -0
  43. package/dist/ts4.2/src/room/track/RemoteTrackPublication.d.ts +4 -1
  44. package/dist/ts4.2/src/room/track/TrackPublication.d.ts +2 -1
  45. package/dist/ts4.2/src/room/track/options.d.ts +1 -1
  46. package/dist/ts4.2/src/room/track/processor/types.d.ts +19 -0
  47. package/package.json +13 -13
  48. package/src/api/SignalClient.ts +8 -1
  49. package/src/index.ts +1 -0
  50. package/src/proto/google/protobuf/timestamp.ts +3 -3
  51. package/src/proto/livekit_models.ts +254 -161
  52. package/src/proto/livekit_rtc.ts +334 -180
  53. package/src/room/Room.ts +26 -1
  54. package/src/room/events.ts +4 -0
  55. package/src/room/participant/LocalParticipant.ts +23 -3
  56. package/src/room/participant/Participant.ts +2 -1
  57. package/src/room/participant/RemoteParticipant.ts +4 -1
  58. package/src/room/participant/publishUtils.ts +40 -11
  59. package/src/room/track/LocalTrack.ts +120 -16
  60. package/src/room/track/LocalVideoTrack.ts +96 -33
  61. package/src/room/track/RemoteTrackPublication.ts +8 -1
  62. package/src/room/track/Track.ts +3 -3
  63. package/src/room/track/TrackPublication.ts +2 -1
  64. package/src/room/track/options.ts +1 -1
  65. package/src/room/track/processor/types.ts +20 -0
@@ -84,6 +84,14 @@ export declare enum ReconnectReason {
84
84
  }
85
85
  export declare function reconnectReasonFromJSON(object: any): ReconnectReason;
86
86
  export declare function reconnectReasonToJSON(object: ReconnectReason): string;
87
+ export declare enum SubscriptionError {
88
+ SE_UNKOWN = 0,
89
+ SE_CODEC_UNSUPPORTED = 1,
90
+ SE_TRACK_NOTFOUND = 2,
91
+ UNRECOGNIZED = -1
92
+ }
93
+ export declare function subscriptionErrorFromJSON(object: any): SubscriptionError;
94
+ export declare function subscriptionErrorToJSON(object: SubscriptionError): string;
87
95
  export interface Room {
88
96
  sid: string;
89
97
  name: string;
@@ -302,7 +310,10 @@ export interface VideoConfiguration {
302
310
  hardwareEncoder: ClientConfigSetting;
303
311
  }
304
312
  export interface DisabledCodecs {
313
+ /** disabled for both publish and subscribe */
305
314
  codecs: Codec[];
315
+ /** only disable for publish */
316
+ publish: Codec[];
306
317
  }
307
318
  export interface RTPStats {
308
319
  startTime?: Date;
@@ -348,6 +359,9 @@ export interface RTPStats {
348
359
  lastKeyFrame?: Date;
349
360
  layerLockPlis: number;
350
361
  lastLayerLockPli?: Date;
362
+ sampleRate: number;
363
+ /** NEXT_ID: 44 */
364
+ driftMs: number;
351
365
  }
352
366
  export interface RTPStats_GapHistogramEntry {
353
367
  key: number;
@@ -2093,6 +2107,10 @@ export declare const ClientConfiguration: {
2093
2107
  mime?: string | undefined;
2094
2108
  fmtpLine?: string | undefined;
2095
2109
  }[] | undefined;
2110
+ publish?: {
2111
+ mime?: string | undefined;
2112
+ fmtpLine?: string | undefined;
2113
+ }[] | undefined;
2096
2114
  } | undefined;
2097
2115
  forceRelay?: ClientConfigSetting | undefined;
2098
2116
  } & {
@@ -2116,6 +2134,10 @@ export declare const ClientConfiguration: {
2116
2134
  mime?: string | undefined;
2117
2135
  fmtpLine?: string | undefined;
2118
2136
  }[] | undefined;
2137
+ publish?: {
2138
+ mime?: string | undefined;
2139
+ fmtpLine?: string | undefined;
2140
+ }[] | undefined;
2119
2141
  } & {
2120
2142
  codecs?: ({
2121
2143
  mime?: string | undefined;
@@ -2134,12 +2156,29 @@ export declare const ClientConfiguration: {
2134
2156
  fmtpLine?: string | undefined;
2135
2157
  }[]>]: never;
2136
2158
  }) | undefined;
2159
+ publish?: ({
2160
+ mime?: string | undefined;
2161
+ fmtpLine?: string | undefined;
2162
+ }[] & ({
2163
+ mime?: string | undefined;
2164
+ fmtpLine?: string | undefined;
2165
+ } & {
2166
+ mime?: string | undefined;
2167
+ fmtpLine?: string | undefined;
2168
+ } & {
2169
+ [K_4 in Exclude<keyof I["disabledCodecs"]["publish"][number], keyof Codec>]: never;
2170
+ })[] & {
2171
+ [K_5 in Exclude<keyof I["disabledCodecs"]["publish"], keyof {
2172
+ mime?: string | undefined;
2173
+ fmtpLine?: string | undefined;
2174
+ }[]>]: never;
2175
+ }) | undefined;
2137
2176
  } & {
2138
- [K_4 in Exclude<keyof I["disabledCodecs"], "codecs">]: never;
2177
+ [K_6 in Exclude<keyof I["disabledCodecs"], keyof DisabledCodecs>]: never;
2139
2178
  }) | undefined;
2140
2179
  forceRelay?: ClientConfigSetting | undefined;
2141
2180
  } & {
2142
- [K_5 in Exclude<keyof I, keyof ClientConfiguration>]: never;
2181
+ [K_7 in Exclude<keyof I, keyof ClientConfiguration>]: never;
2143
2182
  }>(base?: I | undefined): ClientConfiguration;
2144
2183
  fromPartial<I_1 extends {
2145
2184
  video?: {
@@ -2154,6 +2193,10 @@ export declare const ClientConfiguration: {
2154
2193
  mime?: string | undefined;
2155
2194
  fmtpLine?: string | undefined;
2156
2195
  }[] | undefined;
2196
+ publish?: {
2197
+ mime?: string | undefined;
2198
+ fmtpLine?: string | undefined;
2199
+ }[] | undefined;
2157
2200
  } | undefined;
2158
2201
  forceRelay?: ClientConfigSetting | undefined;
2159
2202
  } & {
@@ -2162,14 +2205,14 @@ export declare const ClientConfiguration: {
2162
2205
  } & {
2163
2206
  hardwareEncoder?: ClientConfigSetting | undefined;
2164
2207
  } & {
2165
- [K_6 in Exclude<keyof I_1["video"], "hardwareEncoder">]: never;
2208
+ [K_8 in Exclude<keyof I_1["video"], "hardwareEncoder">]: never;
2166
2209
  }) | undefined;
2167
2210
  screen?: ({
2168
2211
  hardwareEncoder?: ClientConfigSetting | undefined;
2169
2212
  } & {
2170
2213
  hardwareEncoder?: ClientConfigSetting | undefined;
2171
2214
  } & {
2172
- [K_7 in Exclude<keyof I_1["screen"], "hardwareEncoder">]: never;
2215
+ [K_9 in Exclude<keyof I_1["screen"], "hardwareEncoder">]: never;
2173
2216
  }) | undefined;
2174
2217
  resumeConnection?: ClientConfigSetting | undefined;
2175
2218
  disabledCodecs?: ({
@@ -2177,6 +2220,10 @@ export declare const ClientConfiguration: {
2177
2220
  mime?: string | undefined;
2178
2221
  fmtpLine?: string | undefined;
2179
2222
  }[] | undefined;
2223
+ publish?: {
2224
+ mime?: string | undefined;
2225
+ fmtpLine?: string | undefined;
2226
+ }[] | undefined;
2180
2227
  } & {
2181
2228
  codecs?: ({
2182
2229
  mime?: string | undefined;
@@ -2188,19 +2235,36 @@ export declare const ClientConfiguration: {
2188
2235
  mime?: string | undefined;
2189
2236
  fmtpLine?: string | undefined;
2190
2237
  } & {
2191
- [K_8 in Exclude<keyof I_1["disabledCodecs"]["codecs"][number], keyof Codec>]: never;
2238
+ [K_10 in Exclude<keyof I_1["disabledCodecs"]["codecs"][number], keyof Codec>]: never;
2239
+ })[] & {
2240
+ [K_11 in Exclude<keyof I_1["disabledCodecs"]["codecs"], keyof {
2241
+ mime?: string | undefined;
2242
+ fmtpLine?: string | undefined;
2243
+ }[]>]: never;
2244
+ }) | undefined;
2245
+ publish?: ({
2246
+ mime?: string | undefined;
2247
+ fmtpLine?: string | undefined;
2248
+ }[] & ({
2249
+ mime?: string | undefined;
2250
+ fmtpLine?: string | undefined;
2251
+ } & {
2252
+ mime?: string | undefined;
2253
+ fmtpLine?: string | undefined;
2254
+ } & {
2255
+ [K_12 in Exclude<keyof I_1["disabledCodecs"]["publish"][number], keyof Codec>]: never;
2192
2256
  })[] & {
2193
- [K_9 in Exclude<keyof I_1["disabledCodecs"]["codecs"], keyof {
2257
+ [K_13 in Exclude<keyof I_1["disabledCodecs"]["publish"], keyof {
2194
2258
  mime?: string | undefined;
2195
2259
  fmtpLine?: string | undefined;
2196
2260
  }[]>]: never;
2197
2261
  }) | undefined;
2198
2262
  } & {
2199
- [K_10 in Exclude<keyof I_1["disabledCodecs"], "codecs">]: never;
2263
+ [K_14 in Exclude<keyof I_1["disabledCodecs"], keyof DisabledCodecs>]: never;
2200
2264
  }) | undefined;
2201
2265
  forceRelay?: ClientConfigSetting | undefined;
2202
2266
  } & {
2203
- [K_11 in Exclude<keyof I_1, keyof ClientConfiguration>]: never;
2267
+ [K_15 in Exclude<keyof I_1, keyof ClientConfiguration>]: never;
2204
2268
  }>(object: I_1): ClientConfiguration;
2205
2269
  };
2206
2270
  export declare const VideoConfiguration: {
@@ -2233,6 +2297,10 @@ export declare const DisabledCodecs: {
2233
2297
  mime?: string | undefined;
2234
2298
  fmtpLine?: string | undefined;
2235
2299
  }[] | undefined;
2300
+ publish?: {
2301
+ mime?: string | undefined;
2302
+ fmtpLine?: string | undefined;
2303
+ }[] | undefined;
2236
2304
  } & {
2237
2305
  codecs?: ({
2238
2306
  mime?: string | undefined;
@@ -2251,14 +2319,35 @@ export declare const DisabledCodecs: {
2251
2319
  fmtpLine?: string | undefined;
2252
2320
  }[]>]: never;
2253
2321
  }) | undefined;
2322
+ publish?: ({
2323
+ mime?: string | undefined;
2324
+ fmtpLine?: string | undefined;
2325
+ }[] & ({
2326
+ mime?: string | undefined;
2327
+ fmtpLine?: string | undefined;
2328
+ } & {
2329
+ mime?: string | undefined;
2330
+ fmtpLine?: string | undefined;
2331
+ } & {
2332
+ [K_2 in Exclude<keyof I["publish"][number], keyof Codec>]: never;
2333
+ })[] & {
2334
+ [K_3 in Exclude<keyof I["publish"], keyof {
2335
+ mime?: string | undefined;
2336
+ fmtpLine?: string | undefined;
2337
+ }[]>]: never;
2338
+ }) | undefined;
2254
2339
  } & {
2255
- [K_2 in Exclude<keyof I, "codecs">]: never;
2340
+ [K_4 in Exclude<keyof I, keyof DisabledCodecs>]: never;
2256
2341
  }>(base?: I | undefined): DisabledCodecs;
2257
2342
  fromPartial<I_1 extends {
2258
2343
  codecs?: {
2259
2344
  mime?: string | undefined;
2260
2345
  fmtpLine?: string | undefined;
2261
2346
  }[] | undefined;
2347
+ publish?: {
2348
+ mime?: string | undefined;
2349
+ fmtpLine?: string | undefined;
2350
+ }[] | undefined;
2262
2351
  } & {
2263
2352
  codecs?: ({
2264
2353
  mime?: string | undefined;
@@ -2270,15 +2359,32 @@ export declare const DisabledCodecs: {
2270
2359
  mime?: string | undefined;
2271
2360
  fmtpLine?: string | undefined;
2272
2361
  } & {
2273
- [K_3 in Exclude<keyof I_1["codecs"][number], keyof Codec>]: never;
2362
+ [K_5 in Exclude<keyof I_1["codecs"][number], keyof Codec>]: never;
2363
+ })[] & {
2364
+ [K_6 in Exclude<keyof I_1["codecs"], keyof {
2365
+ mime?: string | undefined;
2366
+ fmtpLine?: string | undefined;
2367
+ }[]>]: never;
2368
+ }) | undefined;
2369
+ publish?: ({
2370
+ mime?: string | undefined;
2371
+ fmtpLine?: string | undefined;
2372
+ }[] & ({
2373
+ mime?: string | undefined;
2374
+ fmtpLine?: string | undefined;
2375
+ } & {
2376
+ mime?: string | undefined;
2377
+ fmtpLine?: string | undefined;
2378
+ } & {
2379
+ [K_7 in Exclude<keyof I_1["publish"][number], keyof Codec>]: never;
2274
2380
  })[] & {
2275
- [K_4 in Exclude<keyof I_1["codecs"], keyof {
2381
+ [K_8 in Exclude<keyof I_1["publish"], keyof {
2276
2382
  mime?: string | undefined;
2277
2383
  fmtpLine?: string | undefined;
2278
2384
  }[]>]: never;
2279
2385
  }) | undefined;
2280
2386
  } & {
2281
- [K_5 in Exclude<keyof I_1, "codecs">]: never;
2387
+ [K_9 in Exclude<keyof I_1, keyof DisabledCodecs>]: never;
2282
2388
  }>(object: I_1): DisabledCodecs;
2283
2389
  };
2284
2390
  export declare const RTPStats: {
@@ -2330,6 +2436,8 @@ export declare const RTPStats: {
2330
2436
  lastKeyFrame?: Date | undefined;
2331
2437
  layerLockPlis?: number | undefined;
2332
2438
  lastLayerLockPli?: Date | undefined;
2439
+ sampleRate?: number | undefined;
2440
+ driftMs?: number | undefined;
2333
2441
  } & {
2334
2442
  startTime?: Date | undefined;
2335
2443
  endTime?: Date | undefined;
@@ -2378,6 +2486,8 @@ export declare const RTPStats: {
2378
2486
  lastKeyFrame?: Date | undefined;
2379
2487
  layerLockPlis?: number | undefined;
2380
2488
  lastLayerLockPli?: Date | undefined;
2489
+ sampleRate?: number | undefined;
2490
+ driftMs?: number | undefined;
2381
2491
  } & {
2382
2492
  [K_1 in Exclude<keyof I, keyof RTPStats>]: never;
2383
2493
  }>(base?: I | undefined): RTPStats;
@@ -2425,6 +2535,8 @@ export declare const RTPStats: {
2425
2535
  lastKeyFrame?: Date | undefined;
2426
2536
  layerLockPlis?: number | undefined;
2427
2537
  lastLayerLockPli?: Date | undefined;
2538
+ sampleRate?: number | undefined;
2539
+ driftMs?: number | undefined;
2428
2540
  } & {
2429
2541
  startTime?: Date | undefined;
2430
2542
  endTime?: Date | undefined;
@@ -2473,6 +2585,8 @@ export declare const RTPStats: {
2473
2585
  lastKeyFrame?: Date | undefined;
2474
2586
  layerLockPlis?: number | undefined;
2475
2587
  lastLayerLockPli?: Date | undefined;
2588
+ sampleRate?: number | undefined;
2589
+ driftMs?: number | undefined;
2476
2590
  } & {
2477
2591
  [K_3 in Exclude<keyof I_1, keyof RTPStats>]: never;
2478
2592
  }>(object: I_1): RTPStats;