livekit-client 1.12.2 → 1.12.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.e2ee.worker.js.map +1 -1
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +687 -683
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts +1 -1
- package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +1 -0
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/ts4.2/src/room/participant/publishUtils.d.ts +1 -1
- package/dist/ts4.2/src/room/track/options.d.ts +1 -0
- package/package.json +1 -1
- package/src/room/RTCEngine.ts +4 -4
- package/src/room/participant/publishUtils.ts +4 -2
- package/src/room/track/LocalVideoTrack.ts +10 -8
- package/src/room/track/options.ts +17 -16
@@ -1,7 +1,7 @@
|
|
1
1
|
import LocalAudioTrack from '../track/LocalAudioTrack';
|
2
2
|
import LocalVideoTrack from '../track/LocalVideoTrack';
|
3
|
-
import { VideoPreset } from '../track/options';
|
4
3
|
import type { BackupVideoCodec, TrackPublishOptions, VideoCodec, VideoEncoding } from '../track/options';
|
4
|
+
import { VideoPreset } from '../track/options';
|
5
5
|
/** @internal */
|
6
6
|
export declare function mediaTrackToLocalTrack(mediaStreamTrack: MediaStreamTrack, constraints?: MediaTrackConstraints): LocalVideoTrack | LocalAudioTrack;
|
7
7
|
export declare const presets169: VideoPreset[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"publishUtils.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/publishUtils.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,eAAe,MAAM,0BAA0B,CAAC;AAEvD,OAAO,
|
1
|
+
{"version":3,"file":"publishUtils.d.ts","sourceR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EAAE,OAAO,EACtB,QAAQ,EAAE,WAAW,GACpB,WAAW,EAAE,CAUf;AA4DD,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,SAAS,6BAelE;AAED,gBAAgB;AAChB,qBAAa,eAAe;IAC1B,OAAO,EAAE,MAAM,CAAC;IAEhB,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,SAAS,GAAG,GAAG,GAAG,MAAM,GAAG,YAAY,CAAC;gBAEpC,eAAe,EAAE,MAAM;IAkBnC,QAAQ,IAAI,MAAM;CAGnB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalVideoTrack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"LocalVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalVideoTrack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGjE,qBAAa,kBAAkB;IAC7B,KAAK,E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yC3E;;;OAGG;IACG,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,EAAE;IASxD,SAAS,CAAC,aAAa,sBAyBrB;cAEc,0BAA0B;CAO3C;AAkHD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAW5D;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,wBAAwB,EAAE,EACtC,GAAG,CAAC,EAAE,OAAO,GACZ,UAAU,EAAE,CA6Cd"}
|
@@ -265,6 +265,7 @@ export declare const ScreenSharePresets: {
|
|
265
265
|
readonly h360fps3: VideoPreset;
|
266
266
|
readonly h720fps5: VideoPreset;
|
267
267
|
readonly h720fps15: VideoPreset;
|
268
|
+
readonly h720fps30: VideoPreset;
|
268
269
|
readonly h1080fps15: VideoPreset;
|
269
270
|
readonly h1080fps30: VideoPreset;
|
270
271
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/room/track/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,gBAAgB,CAAC;QAAC,QAAQ,EAAE,aAAa,CAAA;KAAE,GAAG,KAAK,CAAC;IAE3E;;OAEG;IACH,mBAAmB,CAAC,EAAE,aAAa,CAAC;IAEpC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,C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AiB,YAAY,CAAC;IACrB,MAAM,SAAS,EAAE,WAEvB,CAAC;IACK,MAAM,MAAM,EAAE,WAEpB,CAAC;IACK,MAAM,KAAK,EAAE,WAEnB,CAAC;IACK,MAAM,WAAW,EAAE,WAEzB,CAAC;IACK,MAAM,gBAAgB,EAAE,WAE9B,CAAC;IACK,MAAM,sBAAsB,EAAE,WAEpC,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import LocalAudioTrack from '../track/LocalAudioTrack';
|
2
2
|
import LocalVideoTrack from '../track/LocalVideoTrack';
|
3
|
-
import { VideoPreset } from '../track/options';
|
4
3
|
import type { BackupVideoCodec, TrackPublishOptions, VideoCodec, VideoEncoding } from '../track/options';
|
4
|
+
import { VideoPreset } from '../track/options';
|
5
5
|
/** @internal */
|
6
6
|
export declare function mediaTrackToLocalTrack(mediaStreamTrack: MediaStreamTrack, constraints?: MediaTrackConstraints): LocalVideoTrack | LocalAudioTrack;
|
7
7
|
export declare const presets169: VideoPreset[];
|
@@ -273,6 +273,7 @@ export declare const ScreenSharePresets: {
|
|
273
273
|
readonly h360fps3: VideoPreset;
|
274
274
|
readonly h720fps5: VideoPreset;
|
275
275
|
readonly h720fps15: VideoPreset;
|
276
|
+
readonly h720fps30: VideoPreset;
|
276
277
|
readonly h1080fps15: VideoPreset;
|
277
278
|
readonly h1080fps30: VideoPreset;
|
278
279
|
};
|
package/package.json
CHANGED
package/src/room/RTCEngine.ts
CHANGED
@@ -497,11 +497,11 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
497
497
|
|
498
498
|
this.client.onLocalTrackPublished = (res: TrackPublishedResponse) => {
|
499
499
|
log.debug('received trackPublishedResponse', res);
|
500
|
-
|
501
|
-
if (!resolve) {
|
500
|
+
if (!this.pendingTrackResolvers[res.cid]) {
|
502
501
|
log.error(`missing track resolver for ${res.cid}`);
|
503
502
|
return;
|
504
503
|
}
|
504
|
+
const { resolve } = this.pendingTrackResolvers[res.cid];
|
505
505
|
delete this.pendingTrackResolvers[res.cid];
|
506
506
|
resolve(res.track!);
|
507
507
|
};
|
@@ -649,11 +649,11 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
649
649
|
const channel = event.currentTarget as RTCDataChannel;
|
650
650
|
const channelKind = channel.maxRetransmits === 0 ? 'lossy' : 'reliable';
|
651
651
|
|
652
|
-
if (event instanceof ErrorEvent) {
|
652
|
+
if (event instanceof ErrorEvent && event.error) {
|
653
653
|
const { error } = event.error;
|
654
654
|
log.error(`DataChannel error on ${channelKind}: ${event.message}`, error);
|
655
655
|
} else {
|
656
|
-
log.error(`Unknown DataChannel
|
656
|
+
log.error(`Unknown DataChannel error on ${channelKind}`, event);
|
657
657
|
}
|
658
658
|
};
|
659
659
|
|
@@ -3,13 +3,13 @@ import { TrackInvalidError } from '../errors';
|
|
3
3
|
import LocalAudioTrack from '../track/LocalAudioTrack';
|
4
4
|
import LocalVideoTrack from '../track/LocalVideoTrack';
|
5
5
|
import { Track } from '../track/Track';
|
6
|
-
import { ScreenSharePresets, VideoPreset, VideoPresets, VideoPresets43 } from '../track/options';
|
7
6
|
import type {
|
8
7
|
BackupVideoCodec,
|
9
8
|
TrackPublishOptions,
|
10
9
|
VideoCodec,
|
11
10
|
VideoEncoding,
|
12
11
|
} from '../track/options';
|
12
|
+
import { ScreenSharePresets, VideoPreset, VideoPresets, VideoPresets43 } from '../track/options';
|
13
13
|
import { getReactNativeOs, isFireFox, isReactNative, isSVCCodec } from '../utils';
|
14
14
|
|
15
15
|
/** @internal */
|
@@ -240,7 +240,9 @@ export function determineAppropriateEncoding(
|
|
240
240
|
}
|
241
241
|
// presets are based on the assumption of vp8 as a codec
|
242
242
|
// for other codecs we adjust the maxBitrate if no specific videoEncoding has been provided
|
243
|
-
//
|
243
|
+
// users should override these with ones that are optimized for their use case
|
244
|
+
// NOTE: SVC codec bitrates are inclusive of all scalability layers. while
|
245
|
+
// bitrate for non-SVC codecs does not include other simulcast layers.
|
244
246
|
if (codec) {
|
245
247
|
switch (codec) {
|
246
248
|
case 'av1':
|
@@ -2,8 +2,9 @@ import type { SignalClient } from '../../api/SignalClient';
|
|
2
2
|
import log from '../../logger';
|
3
3
|
import { VideoLayer, VideoQuality } from '../../proto/livekit_models_pb';
|
4
4
|
import { SubscribedCodec, SubscribedQuality } from '../../proto/livekit_rtc_pb';
|
5
|
-
import {
|
5
|
+
import { ScalabilityMode } from '../participant/publishUtils';
|
6
6
|
import type { VideoSenderStats } from '../stats';
|
7
|
+
import { computeBitrate, monitorFrequency } from '../stats';
|
7
8
|
import { Mutex, isFireFox, isMobile, isWeb, unwrapConstraint } from '../utils';
|
8
9
|
import LocalTrack from './LocalTrack';
|
9
10
|
import { Track } from './Track';
|
@@ -359,7 +360,7 @@ async function setPublishingLayersForSender(
|
|
359
360
|
let hasChanged = false;
|
360
361
|
|
361
362
|
/* disable closable spatial layer as it has video blur / frozen issue with current server / client
|
362
|
-
1. chrome 113: when switching to up layer with scalability Mode change, it will generate a
|
363
|
+
1. chrome 113: when switching to up layer with scalability Mode change, it will generate a
|
363
364
|
low resolution frame and recover very quickly, but noticable
|
364
365
|
2. livekit sfu: additional pli request cause video frozen for a few frames, also noticable */
|
365
366
|
const closableSpatial = false;
|
@@ -483,15 +484,16 @@ export function videoLayersFromEncodings(
|
|
483
484
|
if (svc) {
|
484
485
|
// svc layers
|
485
486
|
/* @ts-ignore */
|
486
|
-
const
|
487
|
+
const encodingSM = encodings[0].scalabilityMode as string;
|
488
|
+
const sm = new ScalabilityMode(encodingSM);
|
487
489
|
const layers = [];
|
488
490
|
for (let i = 0; i < sm.spatial; i += 1) {
|
489
491
|
layers.push(
|
490
492
|
new VideoLayer({
|
491
493
|
quality: VideoQuality.HIGH - i,
|
492
|
-
width: width / 2 ** i,
|
493
|
-
height: height / 2 ** i,
|
494
|
-
bitrate: encodings[0].maxBitrate ? encodings[0].maxBitrate / 3 ** i : 0,
|
494
|
+
width: Math.ceil(width / 2 ** i),
|
495
|
+
height: Math.ceil(height / 2 ** i),
|
496
|
+
bitrate: encodings[0].maxBitrate ? Math.ceil(encodings[0].maxBitrate / 3 ** i) : 0,
|
495
497
|
ssrc: 0,
|
496
498
|
}),
|
497
499
|
);
|
@@ -504,8 +506,8 @@ export function videoLayersFromEncodings(
|
|
504
506
|
let quality = videoQualityForRid(encoding.rid ?? '');
|
505
507
|
return new VideoLayer({
|
506
508
|
quality,
|
507
|
-
width: width / scale,
|
508
|
-
height: height / scale,
|
509
|
+
width: Math.ceil(width / scale),
|
510
|
+
height: Math.ceil(height / scale),
|
509
511
|
bitrate: encoding.maxBitrate ?? 0,
|
510
512
|
ssrc: 0,
|
511
513
|
});
|
@@ -327,11 +327,11 @@ export namespace AudioPresets {
|
|
327
327
|
* Sane presets for video resolution/encoding
|
328
328
|
*/
|
329
329
|
export const VideoPresets = {
|
330
|
-
h90: new VideoPreset(160, 90,
|
331
|
-
h180: new VideoPreset(320, 180,
|
332
|
-
h216: new VideoPreset(384, 216, 180_000,
|
333
|
-
h360: new VideoPreset(640, 360,
|
334
|
-
h540: new VideoPreset(960, 540,
|
330
|
+
h90: new VideoPreset(160, 90, 90_000, 20),
|
331
|
+
h180: new VideoPreset(320, 180, 160_000, 20),
|
332
|
+
h216: new VideoPreset(384, 216, 180_000, 20),
|
333
|
+
h360: new VideoPreset(640, 360, 450_000, 20),
|
334
|
+
h540: new VideoPreset(960, 540, 800_000, 25),
|
335
335
|
h720: new VideoPreset(1280, 720, 1_700_000, 30),
|
336
336
|
h1080: new VideoPreset(1920, 1080, 3_000_000, 30),
|
337
337
|
h1440: new VideoPreset(2560, 1440, 5_000_000, 30),
|
@@ -342,21 +342,22 @@ export const VideoPresets = {
|
|
342
342
|
* Four by three presets
|
343
343
|
*/
|
344
344
|
export const VideoPresets43 = {
|
345
|
-
h120: new VideoPreset(160, 120,
|
346
|
-
h180: new VideoPreset(240, 180,
|
347
|
-
h240: new VideoPreset(320, 240,
|
345
|
+
h120: new VideoPreset(160, 120, 70_000, 20),
|
346
|
+
h180: new VideoPreset(240, 180, 125_000, 20),
|
347
|
+
h240: new VideoPreset(320, 240, 140_000, 20),
|
348
348
|
h360: new VideoPreset(480, 360, 225_000, 20),
|
349
|
-
h480: new VideoPreset(640, 480,
|
350
|
-
h540: new VideoPreset(720, 540,
|
351
|
-
h720: new VideoPreset(960, 720,
|
352
|
-
h1080: new VideoPreset(1440, 1080,
|
353
|
-
h1440: new VideoPreset(1920, 1440,
|
349
|
+
h480: new VideoPreset(640, 480, 500_000, 20),
|
350
|
+
h540: new VideoPreset(720, 540, 600_000, 25),
|
351
|
+
h720: new VideoPreset(960, 720, 1_300_000, 30),
|
352
|
+
h1080: new VideoPreset(1440, 1080, 2_300_000, 30),
|
353
|
+
h1440: new VideoPreset(1920, 1440, 3_800_000, 30),
|
354
354
|
} as const;
|
355
355
|
|
356
356
|
export const ScreenSharePresets = {
|
357
357
|
h360fps3: new VideoPreset(640, 360, 200_000, 3, 'medium'),
|
358
358
|
h720fps5: new VideoPreset(1280, 720, 400_000, 5, 'medium'),
|
359
|
-
h720fps15: new VideoPreset(1280, 720,
|
360
|
-
|
361
|
-
|
359
|
+
h720fps15: new VideoPreset(1280, 720, 1_500_000, 15, 'medium'),
|
360
|
+
h720fps30: new VideoPreset(1280, 720, 2_000_000, 30, 'medium'),
|
361
|
+
h1080fps15: new VideoPreset(1920, 1080, 2_500_000, 15, 'medium'),
|
362
|
+
h1080fps30: new VideoPreset(1920, 1080, 4_000_000, 30, 'medium'),
|
362
363
|
} as const;
|