livekit-client 1.13.4 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +8 -3
- 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 +25 -15
- 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/Room.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrack.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +13 -3
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/ts4.2/src/room/events.d.ts +1 -1
- package/dist/ts4.2/src/room/track/options.d.ts +13 -3
- package/dist/ts4.2/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/room/Room.ts +5 -2
- package/src/room/events.ts +1 -1
- package/src/room/participant/LocalParticipant.ts +6 -4
- package/src/room/track/RemoteTrack.ts +8 -6
- package/src/room/track/options.ts +14 -3
- package/src/room/utils.ts +3 -0
- package/src/version.ts +1 -1
@@ -11863,10 +11863,10 @@ function getMatch(exp, ua) {
|
|
11863
11863
|
return match && match.length >= id && match[id] || '';
|
11864
11864
|
}
|
11865
11865
|
|
11866
|
-
var version$1 = "1.
|
11866
|
+
var version$1 = "1.14.1";
|
11867
11867
|
|
11868
11868
|
const version = version$1;
|
11869
|
-
const protocolVersion =
|
11869
|
+
const protocolVersion = 10;
|
11870
11870
|
|
11871
11871
|
class VideoPreset {
|
11872
11872
|
constructor(width, height, maxBitrate, maxFramerate, priority) {
|
@@ -12168,7 +12168,7 @@ var RoomEvent;
|
|
12168
12168
|
/**
|
12169
12169
|
* LiveKit will attempt to autoplay all audio tracks when you attach them to
|
12170
12170
|
* audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
|
12171
|
-
* `Room.
|
12171
|
+
* `Room.canPlaybackAudio` will indicate if audio playback is permitted.
|
12172
12172
|
*/
|
12173
12173
|
RoomEvent["AudioPlaybackStatusChanged"] = "audioPlaybackChanged";
|
12174
12174
|
/**
|
@@ -12962,6 +12962,9 @@ function supportsAV1() {
|
|
12962
12962
|
}
|
12963
12963
|
function supportsVP9() {
|
12964
12964
|
if (!('getCapabilities' in RTCRtpSender)) {
|
12965
|
+
return false;
|
12966
|
+
}
|
12967
|
+
if (isFireFox()) {
|
12965
12968
|
// technically speaking FireFox supports VP9, but SVC publishing is broken
|
12966
12969
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1633876
|
12967
12970
|
return false;
|
@@ -18433,14 +18436,16 @@ class RemoteTrack extends Track {
|
|
18433
18436
|
/** @internal */
|
18434
18437
|
setMediaStream(stream) {
|
18435
18438
|
// this is needed to determine when the track is finished
|
18436
|
-
// we send each track down in its own MediaStream, so we can assume the
|
18437
|
-
// current track is the only one that can be removed.
|
18438
18439
|
this.mediaStream = stream;
|
18439
|
-
|
18440
|
-
this.
|
18441
|
-
|
18442
|
-
|
18440
|
+
const onRemoveTrack = event => {
|
18441
|
+
if (event.track === this._mediaStreamTrack) {
|
18442
|
+
stream.removeEventListener('removetrack', onRemoveTrack);
|
18443
|
+
this.receiver = undefined;
|
18444
|
+
this._currentBitrate = 0;
|
18445
|
+
this.emit(TrackEvent.Ended, this);
|
18446
|
+
}
|
18443
18447
|
};
|
18448
|
+
stream.addEventListener('removetrack', onRemoveTrack);
|
18444
18449
|
}
|
18445
18450
|
start() {
|
18446
18451
|
this.startMonitor();
|
@@ -20300,9 +20305,6 @@ class LocalParticipant extends Participant {
|
|
20300
20305
|
if (options === undefined) {
|
20301
20306
|
options = {};
|
20302
20307
|
}
|
20303
|
-
if (options.resolution === undefined) {
|
20304
|
-
options.resolution = ScreenSharePresets.h1080fps15.resolution;
|
20305
|
-
}
|
20306
20308
|
if (navigator.mediaDevices.getDisplayMedia === undefined) {
|
20307
20309
|
throw new DeviceUnsupportedError('getDisplayMedia not supported');
|
20308
20310
|
}
|
@@ -20475,7 +20477,8 @@ class LocalParticipant extends Participant {
|
|
20475
20477
|
disableDtx: !((_a = opts.dtx) !== null && _a !== void 0 ? _a : true),
|
20476
20478
|
encryption: this.encryptionType,
|
20477
20479
|
stereo: isStereo,
|
20478
|
-
disableRed: this.isE2EEEnabled || !((_b = opts.red) !== null && _b !== void 0 ? _b : true)
|
20480
|
+
disableRed: this.isE2EEEnabled || !((_b = opts.red) !== null && _b !== void 0 ? _b : true),
|
20481
|
+
stream: opts === null || opts === void 0 ? void 0 : opts.stream
|
20479
20482
|
});
|
20480
20483
|
// compute encodings and layers for video
|
20481
20484
|
let encodings;
|
@@ -20504,6 +20507,10 @@ class LocalParticipant extends Participant {
|
|
20504
20507
|
// for svc codecs, disable simulcast and use vp8 for backup codec
|
20505
20508
|
if (track instanceof LocalVideoTrack) {
|
20506
20509
|
if (isSVCCodec(opts.videoCodec)) {
|
20510
|
+
// vp9 svc with screenshare has problem to encode, always use L1T3 here
|
20511
|
+
if (track.source === Track.Source.ScreenShare && opts.videoCodec === 'vp9') {
|
20512
|
+
opts.scalabilityMode = 'L1T3';
|
20513
|
+
}
|
20507
20514
|
// set scalabilityMode to 'L3T3_KEY' by default
|
20508
20515
|
opts.scalabilityMode = (_e = opts.scalabilityMode) !== null && _e !== void 0 ? _e : 'L3T3_KEY';
|
20509
20516
|
}
|
@@ -21961,8 +21968,11 @@ class Room extends eventsExports.EventEmitter {
|
|
21961
21968
|
}
|
21962
21969
|
const parts = unpackStreamId(stream.id);
|
21963
21970
|
const participantId = parts[0];
|
21964
|
-
let
|
21965
|
-
|
21971
|
+
let streamId = parts[1];
|
21972
|
+
let trackId = mediaTrack.id;
|
21973
|
+
// firefox will get streamId (pID|trackId) instead of (pID|streamId) as it doesn't support sync tracks by stream
|
21974
|
+
// and generates its own track id instead of infer from sdp track id.
|
21975
|
+
if (streamId && streamId.startsWith('TR')) trackId = streamId;
|
21966
21976
|
if (participantId === this.localParticipant.sid) {
|
21967
21977
|
livekitLogger.warn('tried to create RemoteParticipant for local participant');
|
21968
21978
|
return;
|