livekit-client 2.8.0 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +9 -6
- 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/track/RemoteAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/room/Room.ts +6 -2
- package/src/room/track/RemoteAudioTrack.ts +1 -0
- package/src/room/track/RemoteVideoTrack.ts +1 -0
@@ -11113,7 +11113,7 @@ function getOSVersion(ua) {
|
|
11113
11113
|
return ua.includes('mac os') ? getMatch(/\(.+?(\d+_\d+(:?_\d+)?)/, ua, 1).replace(/_/g, '.') : undefined;
|
11114
11114
|
}
|
11115
11115
|
|
11116
|
-
var version$1 = "2.8.
|
11116
|
+
var version$1 = "2.8.1";
|
11117
11117
|
|
11118
11118
|
const version = version$1;
|
11119
11119
|
const protocolVersion = 15;
|
@@ -18314,6 +18314,7 @@ class RemoteAudioTrack extends RemoteTrack {
|
|
18314
18314
|
if (v.type === 'inbound-rtp') {
|
18315
18315
|
receiverStats = {
|
18316
18316
|
type: 'audio',
|
18317
|
+
streamId: v.id,
|
18317
18318
|
timestamp: v.timestamp,
|
18318
18319
|
jitter: v.jitter,
|
18319
18320
|
bytesReceived: v.bytesReceived,
|
@@ -18460,6 +18461,7 @@ class RemoteVideoTrack extends RemoteTrack {
|
|
18460
18461
|
codecID = v.codecId;
|
18461
18462
|
receiverStats = {
|
18462
18463
|
type: 'video',
|
18464
|
+
streamId: v.id,
|
18463
18465
|
framesDecoded: v.framesDecoded,
|
18464
18466
|
framesDropped: v.framesDropped,
|
18465
18467
|
framesReceived: v.framesReceived,
|
@@ -22378,8 +22380,8 @@ class Room extends eventsExports.EventEmitter {
|
|
22378
22380
|
var _this3 = this;
|
22379
22381
|
let exact = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
22380
22382
|
return function* () {
|
22381
|
-
var _a, _b, _c, _d, _e, _f;
|
22382
|
-
var
|
22383
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
22384
|
+
var _h;
|
22383
22385
|
let success = true;
|
22384
22386
|
let needsUpdateWithoutTracks = false;
|
22385
22387
|
const deviceConstraint = exact ? {
|
@@ -22421,7 +22423,7 @@ class Room extends eventsExports.EventEmitter {
|
|
22421
22423
|
// setting `default` for web audio output doesn't work, so we need to normalize the id before
|
22422
22424
|
deviceId = (_c = yield DeviceManager.getInstance().normalizeDeviceId('audiooutput', deviceId)) !== null && _c !== void 0 ? _c : '';
|
22423
22425
|
}
|
22424
|
-
(_d = (
|
22426
|
+
(_d = (_h = _this3.options).audioOutput) !== null && _d !== void 0 ? _d : _h.audioOutput = {};
|
22425
22427
|
const prevDeviceId = (_e = _this3.getActiveDevice(kind)) !== null && _e !== void 0 ? _e : _this3.options.audioOutput.deviceId;
|
22426
22428
|
_this3.options.audioOutput.deviceId = deviceId;
|
22427
22429
|
try {
|
@@ -22439,8 +22441,9 @@ class Room extends eventsExports.EventEmitter {
|
|
22439
22441
|
throw e;
|
22440
22442
|
}
|
22441
22443
|
}
|
22442
|
-
if (needsUpdateWithoutTracks) {
|
22443
|
-
|
22444
|
+
if (needsUpdateWithoutTracks || kind === 'audiooutput') {
|
22445
|
+
// if there are not active tracks yet or we're switching audiooutput, we need to manually update the active device map here as changing audio output won't result in a track restart
|
22446
|
+
_this3.localParticipant.activeDeviceMap.set(kind, kind === 'audiooutput' && ((_g = _this3.options.audioOutput) === null || _g === void 0 ? void 0 : _g.deviceId) || deviceId);
|
22444
22447
|
_this3.emit(RoomEvent.ActiveDeviceChanged, kind, deviceId);
|
22445
22448
|
}
|
22446
22449
|
return success;
|