livekit-client 2.9.8 → 2.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/livekit-client.esm.mjs +19 -10
- 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/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/SignalClient.ts +2 -2
- package/src/room/Room.ts +6 -1
- package/src/room/track/utils.ts +10 -4
@@ -11169,7 +11169,7 @@ function getOSVersion(ua) {
|
|
11169
11169
|
return ua.includes('mac os') ? getMatch(/\(.+?(\d+_\d+(:?_\d+)?)/, ua, 1).replace(/_/g, '.') : undefined;
|
11170
11170
|
}
|
11171
11171
|
|
11172
|
-
var version$1 = "2.9.
|
11172
|
+
var version$1 = "2.9.9";
|
11173
11173
|
|
11174
11174
|
const version = version$1;
|
11175
11175
|
const protocolVersion = 15;
|
@@ -12291,12 +12291,17 @@ function getNewAudioContext() {
|
|
12291
12291
|
});
|
12292
12292
|
// If the audio context is suspended, we need to resume it when the user clicks on the page
|
12293
12293
|
if (audioContext.state === 'suspended' && typeof window !== 'undefined' && ((_a = window.document) === null || _a === void 0 ? void 0 : _a.body)) {
|
12294
|
-
const handleResume = () => {
|
12295
|
-
|
12296
|
-
|
12297
|
-
(
|
12298
|
-
|
12299
|
-
|
12294
|
+
const handleResume = () => __awaiter(this, void 0, void 0, function* () {
|
12295
|
+
var _a;
|
12296
|
+
try {
|
12297
|
+
if (audioContext.state === 'suspended') {
|
12298
|
+
yield audioContext.resume();
|
12299
|
+
}
|
12300
|
+
} catch (e) {
|
12301
|
+
console.warn('Error trying to auto-resume audio context', e);
|
12302
|
+
}
|
12303
|
+
(_a = window.document.body) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleResume);
|
12304
|
+
});
|
12300
12305
|
window.document.body.addEventListener('click', handleResume);
|
12301
12306
|
}
|
12302
12307
|
return audioContext;
|
@@ -13030,8 +13035,8 @@ class SignalClient {
|
|
13030
13035
|
this.connectOptions = opts;
|
13031
13036
|
const urlObj = new URL(toWebsocketUrl(url));
|
13032
13037
|
// strip trailing slash
|
13033
|
-
|
13034
|
-
urlObj.pathname += '/rtc';
|
13038
|
+
const hasTrailingSlash = urlObj.pathname.endsWith('/');
|
13039
|
+
urlObj.pathname += hasTrailingSlash ? 'rtc' : '/rtc';
|
13035
13040
|
const clientInfo = getClientInfo();
|
13036
13041
|
const params = createConnectionParams(token, clientInfo, opts);
|
13037
13042
|
for (const [key, value] of params) {
|
@@ -23216,6 +23221,10 @@ class Room extends eventsExports.EventEmitter {
|
|
23216
23221
|
this.log.warn('skipping incoming track after Room disconnected', this.logContext);
|
23217
23222
|
return;
|
23218
23223
|
}
|
23224
|
+
if (mediaTrack.readyState === 'ended') {
|
23225
|
+
this.log.info('skipping incoming track as it already ended', this.logContext);
|
23226
|
+
return;
|
23227
|
+
}
|
23219
23228
|
const parts = unpackStreamId(stream.id);
|
23220
23229
|
const participantSid = parts[0];
|
23221
23230
|
let streamId = parts[1];
|
@@ -23723,7 +23732,7 @@ class Room extends eventsExports.EventEmitter {
|
|
23723
23732
|
args[_key3 - 1] = arguments[_key3];
|
23724
23733
|
}
|
23725
23734
|
// active speaker updates are too spammy
|
23726
|
-
if (event !== RoomEvent.ActiveSpeakersChanged) {
|
23735
|
+
if (event !== RoomEvent.ActiveSpeakersChanged && event !== RoomEvent.TranscriptionReceived) {
|
23727
23736
|
// only extract logContext from arguments in order to avoid logging the whole object tree
|
23728
23737
|
const minimizedArgs = mapArgs(args).filter(arg => arg !== undefined);
|
23729
23738
|
this.log.debug("room event ".concat(event), Object.assign(Object.assign({}, this.logContext), {
|