livekit-client 2.17.3 → 2.18.0
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 +64 -46
- 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/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +3 -1
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/data-track/{track.d.ts → LocalDataTrack.d.ts} +9 -14
- package/dist/src/room/data-track/LocalDataTrack.d.ts.map +1 -0
- package/dist/src/room/data-track/RemoteDataTrack.d.ts +46 -0
- package/dist/src/room/data-track/RemoteDataTrack.d.ts.map +1 -0
- package/dist/src/room/data-track/depacketizer.d.ts +3 -3
- package/dist/src/room/data-track/depacketizer.d.ts.map +1 -1
- package/dist/src/room/data-track/e2ee.d.ts +1 -1
- package/dist/src/room/data-track/e2ee.d.ts.map +1 -1
- package/dist/src/room/data-track/handle.d.ts +2 -2
- package/dist/src/room/data-track/handle.d.ts.map +1 -1
- package/dist/src/room/data-track/incoming/IncomingDataTrackManager.d.ts +96 -0
- package/dist/src/room/data-track/incoming/IncomingDataTrackManager.d.ts.map +1 -0
- package/dist/src/room/data-track/incoming/errors.d.ts +24 -0
- package/dist/src/room/data-track/incoming/errors.d.ts.map +1 -0
- package/dist/src/room/data-track/incoming/pipeline.d.ts +37 -0
- package/dist/src/room/data-track/incoming/pipeline.d.ts.map +1 -0
- package/dist/src/room/data-track/incoming/types.d.ts +20 -0
- package/dist/src/room/data-track/incoming/types.d.ts.map +1 -0
- package/dist/src/room/data-track/outgoing/OutgoingDataTrackManager.d.ts +9 -8
- package/dist/src/room/data-track/outgoing/OutgoingDataTrackManager.d.ts.map +1 -1
- package/dist/src/room/data-track/outgoing/errors.d.ts +4 -4
- package/dist/src/room/data-track/outgoing/errors.d.ts.map +1 -1
- package/dist/src/room/data-track/outgoing/pipeline.d.ts +3 -3
- package/dist/src/room/data-track/outgoing/pipeline.d.ts.map +1 -1
- package/dist/src/room/data-track/outgoing/types.d.ts +4 -5
- package/dist/src/room/data-track/outgoing/types.d.ts.map +1 -1
- package/dist/src/room/data-track/packet/errors.d.ts +2 -4
- package/dist/src/room/data-track/packet/errors.d.ts.map +1 -1
- package/dist/src/room/data-track/packet/extensions.d.ts +4 -4
- package/dist/src/room/data-track/packet/extensions.d.ts.map +1 -1
- package/dist/src/room/data-track/packet/index.d.ts +5 -5
- package/dist/src/room/data-track/packet/index.d.ts.map +1 -1
- package/dist/src/room/data-track/packet/serializable.d.ts +4 -4
- package/dist/src/room/data-track/packet/serializable.d.ts.map +1 -1
- package/dist/src/room/data-track/packetizer.d.ts +3 -3
- package/dist/src/room/data-track/packetizer.d.ts.map +1 -1
- package/dist/src/room/data-track/track-interfaces.d.ts +23 -0
- package/dist/src/room/data-track/track-interfaces.d.ts.map +1 -0
- package/dist/src/room/data-track/types.d.ts +10 -0
- package/dist/src/room/data-track/types.d.ts.map +1 -0
- package/dist/src/room/participant/RemoteParticipant.d.ts +1 -1
- package/dist/src/room/token-source/TokenSource.d.ts +1 -1
- package/dist/src/room/token-source/TokenSource.d.ts.map +1 -1
- package/dist/src/room/token-source/types.d.ts +1 -0
- package/dist/src/room/token-source/types.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts +1 -1
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/utils/abort-signal-polyfill.d.ts +13 -0
- package/dist/src/utils/abort-signal-polyfill.d.ts.map +1 -0
- package/dist/src/utils/subscribeToEvents.d.ts +3 -0
- package/dist/src/utils/subscribeToEvents.d.ts.map +1 -1
- package/dist/ts4.2/index.d.ts +1 -1
- package/dist/ts4.2/room/RTCEngine.d.ts +3 -1
- package/dist/ts4.2/room/data-track/{track.d.ts → LocalDataTrack.d.ts} +9 -14
- package/dist/ts4.2/room/data-track/RemoteDataTrack.d.ts +46 -0
- package/dist/ts4.2/room/data-track/depacketizer.d.ts +3 -3
- package/dist/ts4.2/room/data-track/e2ee.d.ts +1 -1
- package/dist/ts4.2/room/data-track/handle.d.ts +2 -2
- package/dist/ts4.2/room/data-track/incoming/IncomingDataTrackManager.d.ts +99 -0
- package/dist/ts4.2/room/data-track/incoming/errors.d.ts +24 -0
- package/dist/ts4.2/room/data-track/incoming/pipeline.d.ts +37 -0
- package/dist/ts4.2/room/data-track/incoming/types.d.ts +20 -0
- package/dist/ts4.2/room/data-track/outgoing/OutgoingDataTrackManager.d.ts +9 -9
- package/dist/ts4.2/room/data-track/outgoing/errors.d.ts +4 -4
- package/dist/ts4.2/room/data-track/outgoing/pipeline.d.ts +3 -3
- package/dist/ts4.2/room/data-track/outgoing/types.d.ts +4 -5
- package/dist/ts4.2/room/data-track/packet/errors.d.ts +2 -4
- package/dist/ts4.2/room/data-track/packet/extensions.d.ts +4 -4
- package/dist/ts4.2/room/data-track/packet/index.d.ts +5 -6
- package/dist/ts4.2/room/data-track/packet/serializable.d.ts +4 -4
- package/dist/ts4.2/room/data-track/packetizer.d.ts +3 -3
- package/dist/ts4.2/room/data-track/track-interfaces.d.ts +23 -0
- package/dist/ts4.2/room/data-track/types.d.ts +10 -0
- package/dist/ts4.2/room/participant/RemoteParticipant.d.ts +1 -1
- package/dist/ts4.2/room/token-source/TokenSource.d.ts +1 -1
- package/dist/ts4.2/room/token-source/types.d.ts +1 -0
- package/dist/ts4.2/room/utils.d.ts +1 -1
- package/dist/ts4.2/utils/abort-signal-polyfill.d.ts +13 -0
- package/dist/ts4.2/utils/subscribeToEvents.d.ts +3 -0
- package/package.json +4 -2
- package/src/index.ts +1 -1
- package/src/room/RTCEngine.ts +8 -1
- package/src/room/Room.ts +3 -3
- package/src/room/data-stream/outgoing/OutgoingDataStreamManager.ts +2 -2
- package/src/room/data-track/{track.ts → LocalDataTrack.ts} +13 -10
- package/src/room/data-track/RemoteDataTrack.ts +82 -0
- package/src/room/data-track/depacketizer.ts +4 -16
- package/src/room/data-track/e2ee.ts +2 -1
- package/src/room/data-track/handle.ts +2 -8
- package/src/room/data-track/incoming/IncomingDataTrackManager.test.ts +570 -0
- package/src/room/data-track/incoming/IncomingDataTrackManager.ts +537 -0
- package/src/room/data-track/incoming/errors.ts +57 -0
- package/src/room/data-track/incoming/pipeline.ts +116 -0
- package/src/room/data-track/incoming/types.ts +22 -0
- package/src/room/data-track/outgoing/OutgoingDataTrackManager.test.ts +20 -0
- package/src/room/data-track/outgoing/OutgoingDataTrackManager.ts +18 -12
- package/src/room/data-track/outgoing/errors.ts +4 -4
- package/src/room/data-track/outgoing/pipeline.ts +3 -7
- package/src/room/data-track/outgoing/types.ts +4 -5
- package/src/room/data-track/packet/errors.ts +2 -14
- package/src/room/data-track/packet/extensions.ts +4 -4
- package/src/room/data-track/packet/index.ts +4 -6
- package/src/room/data-track/packet/serializable.ts +4 -4
- package/src/room/data-track/packetizer.ts +3 -6
- package/src/room/data-track/track-interfaces.ts +53 -0
- package/src/room/data-track/types.ts +11 -0
- package/src/room/participant/RemoteParticipant.ts +1 -1
- package/src/room/token-source/TokenSource.ts +8 -2
- package/src/room/token-source/types.ts +4 -0
- package/src/room/utils.ts +1 -1
- package/src/utils/abort-signal-polyfill.ts +63 -0
- package/src/utils/subscribeToEvents.ts +18 -1
- package/dist/src/room/data-track/track.d.ts.map +0 -1
- package/dist/src/utils/throws.d.ts +0 -36
- package/dist/src/utils/throws.d.ts.map +0 -1
- package/dist/ts4.2/utils/throws.d.ts +0 -39
- package/src/utils/throws.ts +0 -42
|
@@ -11606,7 +11606,7 @@ function getMatch(exp, ua) {
|
|
|
11606
11606
|
}
|
|
11607
11607
|
function getOSVersion(ua) {
|
|
11608
11608
|
return ua.includes('mac os') ? getMatch(/\(.+?(\d+_\d+(:?_\d+)?)/, ua, 1).replace(/_/g, '.') : undefined;
|
|
11609
|
-
}var version$1 = "2.
|
|
11609
|
+
}var version$1 = "2.18.0";const version = version$1;
|
|
11610
11610
|
const protocolVersion = 16;/** Base error that all LiveKit specific custom errors inherit from. */
|
|
11611
11611
|
class LivekitError extends Error {
|
|
11612
11612
|
constructor(code, message, options) {
|
|
@@ -19830,6 +19830,9 @@ class RTCEngine extends eventsExports.EventEmitter {
|
|
|
19830
19830
|
get isClosed() {
|
|
19831
19831
|
return this._isClosed;
|
|
19832
19832
|
}
|
|
19833
|
+
get isNewlyCreated() {
|
|
19834
|
+
return this._isNewlyCreated;
|
|
19835
|
+
}
|
|
19833
19836
|
get pendingReconnect() {
|
|
19834
19837
|
return !!this.reconnectTimeout;
|
|
19835
19838
|
}
|
|
@@ -19847,6 +19850,7 @@ class RTCEngine extends eventsExports.EventEmitter {
|
|
|
19847
19850
|
this.subscriberPrimary = false;
|
|
19848
19851
|
this.pcState = PCState.New;
|
|
19849
19852
|
this._isClosed = true;
|
|
19853
|
+
this._isNewlyCreated = true;
|
|
19850
19854
|
this.pendingTrackResolvers = {};
|
|
19851
19855
|
this.reconnectAttempts = 0;
|
|
19852
19856
|
this.reconnectStart = 0;
|
|
@@ -20104,7 +20108,7 @@ class RTCEngine extends eventsExports.EventEmitter {
|
|
|
20104
20108
|
room: (_b = (_a = this.latestJoinResponse) === null || _a === void 0 ? void 0 : _a.room) === null || _b === void 0 ? void 0 : _b.name,
|
|
20105
20109
|
roomID: (_d = (_c = this.latestJoinResponse) === null || _c === void 0 ? void 0 : _c.room) === null || _d === void 0 ? void 0 : _d.sid,
|
|
20106
20110
|
participant: (_f = (_e = this.latestJoinResponse) === null || _e === void 0 ? void 0 : _e.participant) === null || _f === void 0 ? void 0 : _f.identity,
|
|
20107
|
-
|
|
20111
|
+
participantID: this.participantSid
|
|
20108
20112
|
};
|
|
20109
20113
|
}
|
|
20110
20114
|
join(url_1, token_1, opts_1, abortSignal_1) {
|
|
@@ -20112,6 +20116,7 @@ class RTCEngine extends eventsExports.EventEmitter {
|
|
|
20112
20116
|
var _this2 = this;
|
|
20113
20117
|
let useV0Path = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
20114
20118
|
return function* () {
|
|
20119
|
+
_this2._isNewlyCreated = false;
|
|
20115
20120
|
_this2.url = url;
|
|
20116
20121
|
_this2.token = token;
|
|
20117
20122
|
_this2.signalOpts = opts;
|
|
@@ -21767,7 +21772,7 @@ class OutgoingDataStreamManager {
|
|
|
21767
21772
|
mimeType: info.mimeType,
|
|
21768
21773
|
topic: info.topic,
|
|
21769
21774
|
timestamp: numberToBigInt(info.timestamp),
|
|
21770
|
-
totalLength: numberToBigInt(
|
|
21775
|
+
totalLength: numberToBigInt(info.size),
|
|
21771
21776
|
attributes: info.attributes,
|
|
21772
21777
|
contentHeader: {
|
|
21773
21778
|
case: 'textHeader',
|
|
@@ -21877,7 +21882,7 @@ class OutgoingDataStreamManager {
|
|
|
21877
21882
|
}
|
|
21878
21883
|
streamBytes(options) {
|
|
21879
21884
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21880
|
-
var _a, _b, _c, _d, _e
|
|
21885
|
+
var _a, _b, _c, _d, _e;
|
|
21881
21886
|
const streamId = (_a = options === null || options === void 0 ? void 0 : options.streamId) !== null && _a !== void 0 ? _a : crypto.randomUUID();
|
|
21882
21887
|
const destinationIdentities = options === null || options === void 0 ? void 0 : options.destinationIdentities;
|
|
21883
21888
|
const info = {
|
|
@@ -21891,7 +21896,7 @@ class OutgoingDataStreamManager {
|
|
|
21891
21896
|
encryptionType: ((_e = this.engine.e2eeManager) === null || _e === void 0 ? void 0 : _e.isDataChannelEncryptionEnabled) ? Encryption_Type.GCM : Encryption_Type.NONE
|
|
21892
21897
|
};
|
|
21893
21898
|
const header = new DataStream_Header({
|
|
21894
|
-
totalLength: numberToBigInt(
|
|
21899
|
+
totalLength: numberToBigInt(info.size),
|
|
21895
21900
|
mimeType: info.mimeType,
|
|
21896
21901
|
streamId,
|
|
21897
21902
|
topic: info.topic,
|
|
@@ -25296,7 +25301,7 @@ class Participant extends eventsExports.EventEmitter {
|
|
|
25296
25301
|
}
|
|
25297
25302
|
get logContext() {
|
|
25298
25303
|
return Object.assign(Object.assign({}, super.logContext), {
|
|
25299
|
-
|
|
25304
|
+
remoteParticipantID: this.sid,
|
|
25300
25305
|
remoteParticipant: this.identity
|
|
25301
25306
|
});
|
|
25302
25307
|
}
|
|
@@ -26452,7 +26457,7 @@ class Room extends eventsExports.EventEmitter {
|
|
|
26452
26457
|
room: this.name,
|
|
26453
26458
|
roomID: (_a = this.roomInfo) === null || _a === void 0 ? void 0 : _a.sid,
|
|
26454
26459
|
participant: this.localParticipant.identity,
|
|
26455
|
-
|
|
26460
|
+
participantID: this.localParticipant.sid
|
|
26456
26461
|
};
|
|
26457
26462
|
}
|
|
26458
26463
|
/**
|
|
@@ -26506,7 +26511,7 @@ class Room extends eventsExports.EventEmitter {
|
|
|
26506
26511
|
return (_b = (_a = this.roomInfo) === null || _a === void 0 ? void 0 : _a.numPublishers) !== null && _b !== void 0 ? _b : 0;
|
|
26507
26512
|
}
|
|
26508
26513
|
maybeCreateEngine() {
|
|
26509
|
-
if (this.engine && !this.engine.isClosed) {
|
|
26514
|
+
if (this.engine && (this.engine.isNewlyCreated || !this.engine.isClosed)) {
|
|
26510
26515
|
return;
|
|
26511
26516
|
}
|
|
26512
26517
|
this.engine = new RTCEngine(this.options);
|
|
@@ -26959,7 +26964,7 @@ class Room extends eventsExports.EventEmitter {
|
|
|
26959
26964
|
}
|
|
26960
26965
|
if (!trackId.startsWith('TR')) {
|
|
26961
26966
|
this.log.warn("Tried to add a track whose 'sid' could not be determined for a participant, that's not present. Sid: ".concat(participantSid, ", streamId: ").concat(streamId, ", trackId: ").concat(trackId), Object.assign(Object.assign({}, this.logContext), {
|
|
26962
|
-
|
|
26967
|
+
remoteParticipantID: participantSid,
|
|
26963
26968
|
streamId,
|
|
26964
26969
|
trackId
|
|
26965
26970
|
}));
|
|
@@ -27630,7 +27635,39 @@ function coerceToDataView(input) {
|
|
|
27630
27635
|
} else {
|
|
27631
27636
|
throw new Error("Error coercing ".concat(input, " to DataView - input was not DataView, ArrayBuffer, or Uint8Array."));
|
|
27632
27637
|
}
|
|
27633
|
-
}
|
|
27638
|
+
}var DataTrackHandleErrorReason;
|
|
27639
|
+
(function (DataTrackHandleErrorReason) {
|
|
27640
|
+
DataTrackHandleErrorReason[DataTrackHandleErrorReason["Reserved"] = 0] = "Reserved";
|
|
27641
|
+
DataTrackHandleErrorReason[DataTrackHandleErrorReason["TooLarge"] = 1] = "TooLarge";
|
|
27642
|
+
})(DataTrackHandleErrorReason || (DataTrackHandleErrorReason = {}));
|
|
27643
|
+
class DataTrackHandleError extends LivekitReasonedError {
|
|
27644
|
+
constructor(message, reason) {
|
|
27645
|
+
super(19, message);
|
|
27646
|
+
this.name = 'DataTrackHandleError';
|
|
27647
|
+
this.reason = reason;
|
|
27648
|
+
this.reasonName = DataTrackHandleErrorReason[reason];
|
|
27649
|
+
}
|
|
27650
|
+
isReason(reason) {
|
|
27651
|
+
return this.reason === reason;
|
|
27652
|
+
}
|
|
27653
|
+
static tooLarge() {
|
|
27654
|
+
return new DataTrackHandleError('Value too large to be a valid track handle', DataTrackHandleErrorReason.TooLarge);
|
|
27655
|
+
}
|
|
27656
|
+
static reserved(value) {
|
|
27657
|
+
return new DataTrackHandleError("0x".concat(value.toString(16), " is a reserved value."), DataTrackHandleErrorReason.Reserved);
|
|
27658
|
+
}
|
|
27659
|
+
}
|
|
27660
|
+
const DataTrackHandle = {
|
|
27661
|
+
fromNumber(raw) {
|
|
27662
|
+
if (raw === 0) {
|
|
27663
|
+
throw DataTrackHandleError.reserved(raw);
|
|
27664
|
+
}
|
|
27665
|
+
if (raw > U16_MAX_SIZE) {
|
|
27666
|
+
throw DataTrackHandleError.tooLarge();
|
|
27667
|
+
}
|
|
27668
|
+
return raw;
|
|
27669
|
+
}
|
|
27670
|
+
};// Number type sizes
|
|
27634
27671
|
const U8_LENGTH_BYTES = 1;
|
|
27635
27672
|
const U16_LENGTH_BYTES = 2;
|
|
27636
27673
|
const U32_LENGTH_BYTES = 4;
|
|
@@ -27893,39 +27930,7 @@ class DataTrackExtensions extends Serializable {
|
|
|
27893
27930
|
e2ee: (_d = (_c = this.e2ee) === null || _c === void 0 ? void 0 : _c.toJSON()) !== null && _d !== void 0 ? _d : null
|
|
27894
27931
|
};
|
|
27895
27932
|
}
|
|
27896
|
-
}
|
|
27897
|
-
(function (DataTrackHandleErrorReason) {
|
|
27898
|
-
DataTrackHandleErrorReason[DataTrackHandleErrorReason["Reserved"] = 0] = "Reserved";
|
|
27899
|
-
DataTrackHandleErrorReason[DataTrackHandleErrorReason["TooLarge"] = 1] = "TooLarge";
|
|
27900
|
-
})(DataTrackHandleErrorReason || (DataTrackHandleErrorReason = {}));
|
|
27901
|
-
class DataTrackHandleError extends LivekitReasonedError {
|
|
27902
|
-
constructor(message, reason) {
|
|
27903
|
-
super(19, message);
|
|
27904
|
-
this.name = 'DataTrackHandleError';
|
|
27905
|
-
this.reason = reason;
|
|
27906
|
-
this.reasonName = DataTrackHandleErrorReason[reason];
|
|
27907
|
-
}
|
|
27908
|
-
isReason(reason) {
|
|
27909
|
-
return this.reason === reason;
|
|
27910
|
-
}
|
|
27911
|
-
static tooLarge() {
|
|
27912
|
-
return new DataTrackHandleError('Value too large to be a valid track handle', DataTrackHandleErrorReason.TooLarge);
|
|
27913
|
-
}
|
|
27914
|
-
static reserved(value) {
|
|
27915
|
-
return new DataTrackHandleError("0x".concat(value.toString(16), " is a reserved value."), DataTrackHandleErrorReason.Reserved);
|
|
27916
|
-
}
|
|
27917
|
-
}
|
|
27918
|
-
const DataTrackHandle = {
|
|
27919
|
-
fromNumber(raw) {
|
|
27920
|
-
if (raw === 0) {
|
|
27921
|
-
throw DataTrackHandleError.reserved(raw);
|
|
27922
|
-
}
|
|
27923
|
-
if (raw > U16_MAX_SIZE) {
|
|
27924
|
-
throw DataTrackHandleError.tooLarge();
|
|
27925
|
-
}
|
|
27926
|
-
return raw;
|
|
27927
|
-
}
|
|
27928
|
-
};/** A class for serializing / deserializing data track packet header sections. */
|
|
27933
|
+
}/** A class for serializing / deserializing data track packet header sections. */
|
|
27929
27934
|
class DataTrackPacketHeader extends Serializable {
|
|
27930
27935
|
constructor(opts) {
|
|
27931
27936
|
var _a;
|
|
@@ -28173,7 +28178,17 @@ var DataTrackDepacketizerDropReason;
|
|
|
28173
28178
|
DataTrackDepacketizerDropReason[DataTrackDepacketizerDropReason["UnknownFrame"] = 1] = "UnknownFrame";
|
|
28174
28179
|
DataTrackDepacketizerDropReason[DataTrackDepacketizerDropReason["BufferFull"] = 2] = "BufferFull";
|
|
28175
28180
|
DataTrackDepacketizerDropReason[DataTrackDepacketizerDropReason["Incomplete"] = 3] = "Incomplete";
|
|
28176
|
-
})(DataTrackDepacketizerDropReason || (DataTrackDepacketizerDropReason = {}));var
|
|
28181
|
+
})(DataTrackDepacketizerDropReason || (DataTrackDepacketizerDropReason = {}));var DataTrackSubscribeErrorReason;
|
|
28182
|
+
(function (DataTrackSubscribeErrorReason) {
|
|
28183
|
+
/** The track has been unpublished and is no longer available */
|
|
28184
|
+
DataTrackSubscribeErrorReason[DataTrackSubscribeErrorReason["Unpublished"] = 0] = "Unpublished";
|
|
28185
|
+
/** Request to subscribe to data track timed-out */
|
|
28186
|
+
DataTrackSubscribeErrorReason[DataTrackSubscribeErrorReason["Timeout"] = 1] = "Timeout";
|
|
28187
|
+
/** Cannot subscribe to data track when disconnected */
|
|
28188
|
+
DataTrackSubscribeErrorReason[DataTrackSubscribeErrorReason["Disconnected"] = 2] = "Disconnected";
|
|
28189
|
+
/** Subscription to data track cancelled by caller */
|
|
28190
|
+
DataTrackSubscribeErrorReason[DataTrackSubscribeErrorReason["Cancelled"] = 4] = "Cancelled";
|
|
28191
|
+
})(DataTrackSubscribeErrorReason || (DataTrackSubscribeErrorReason = {}));getLogger(LoggerNames.DataTracks);getLogger(LoggerNames.DataTracks);var DataTrackPublishErrorReason;
|
|
28177
28192
|
(function (DataTrackPublishErrorReason) {
|
|
28178
28193
|
/**
|
|
28179
28194
|
* Local participant does not have permission to publish data tracks.
|
|
@@ -29288,7 +29303,7 @@ class TokenSourceCached extends TokenSourceConfigurable {
|
|
|
29288
29303
|
if (!isResponseTokenValid(this.cachedResponse)) {
|
|
29289
29304
|
return false;
|
|
29290
29305
|
}
|
|
29291
|
-
if (this.isSameAsCachedFetchOptions(fetchOptions)) {
|
|
29306
|
+
if (!this.isSameAsCachedFetchOptions(fetchOptions)) {
|
|
29292
29307
|
return false;
|
|
29293
29308
|
}
|
|
29294
29309
|
return true;
|
|
@@ -29299,10 +29314,13 @@ class TokenSourceCached extends TokenSourceConfigurable {
|
|
|
29299
29314
|
}
|
|
29300
29315
|
return decodeTokenPayload(this.cachedResponse.participantToken);
|
|
29301
29316
|
}
|
|
29302
|
-
fetch(options) {
|
|
29317
|
+
fetch(options, force) {
|
|
29303
29318
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29304
29319
|
const unlock = yield this.fetchMutex.lock();
|
|
29305
29320
|
try {
|
|
29321
|
+
if (force) {
|
|
29322
|
+
this.cachedResponse = null;
|
|
29323
|
+
}
|
|
29306
29324
|
if (this.shouldReturnCachedValueFromFetch(options)) {
|
|
29307
29325
|
return this.cachedResponse.toJson();
|
|
29308
29326
|
}
|