genesys-cloud-streaming-client 18.0.1-develop.125 → 18.0.1-develop.126

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.
@@ -34,6 +34,7 @@ class GenesysCloudMediaSession {
34
34
  this.allowTCP = !!params.allowTCP;
35
35
  this.reinvite = !!params.reinvite;
36
36
  this.privAnswerMode = params.privAnswerMode;
37
+ this.meetingId = params.meetingId;
37
38
  // babel does not like the typescript recipe for multiple extends so we are hacking this one
38
39
  // referencing https://github.com/babel/babel/issues/798
39
40
  const eventEmitter = new events_1.EventEmitter();
@@ -193,6 +193,7 @@ class WebrtcExtension extends events_1.EventEmitter {
193
193
  originalRoomJid: pendingSession.originalRoomJid,
194
194
  privAnswerMode: pendingSession.privAnswerMode
195
195
  };
196
+ delete this.pendingSessions[pendingSession.sessionId];
196
197
  }
197
198
  else {
198
199
  mediaSessionParams = commonParams;
@@ -300,15 +301,13 @@ class WebrtcExtension extends events_1.EventEmitter {
300
301
  }
301
302
  prepareSession(options) {
302
303
  const pendingSession = this.pendingSessions[options.sid];
303
- // TODO: when we can safely remove the jingle session handling, this pending session
304
- // will need to be deleted in the `handleGenesysOffer` fn.
305
- if (pendingSession) {
306
- delete this.pendingSessions[pendingSession.sessionId];
307
- }
308
304
  if (pendingSession === null || pendingSession === void 0 ? void 0 : pendingSession.sdpOverXmpp) {
309
305
  this.logger.debug('skipping creation of jingle webrtc session due to sdpOverXmpp on the pendingSession');
310
306
  return;
311
307
  }
308
+ if (pendingSession) {
309
+ delete this.pendingSessions[pendingSession.sessionId];
310
+ }
312
311
  const ignoreHostCandidatesForForceTurnFF = this.getIceTransportPolicy() === 'relay' && browserama_1.isFirefox;
313
312
  const gcSessionOpts = {
314
313
  options,
@@ -17,6 +17,6 @@
17
17
  "file": "v18/streaming-client.browser.js"
18
18
  }
19
19
  ],
20
- "build": "125",
21
- "buildDate": "2025-01-14T19:50:26.073074953Z"
20
+ "build": "126",
21
+ "buildDate": "2025-01-16T19:49:50.170135360Z"
22
22
  }
@@ -31445,6 +31445,7 @@ class GenesysCloudMediaSession {
31445
31445
  this.allowTCP = !!params.allowTCP;
31446
31446
  this.reinvite = !!params.reinvite;
31447
31447
  this.privAnswerMode = params.privAnswerMode;
31448
+ this.meetingId = params.meetingId;
31448
31449
  // babel does not like the typescript recipe for multiple extends so we are hacking this one
31449
31450
  // referencing https://github.com/babel/babel/issues/798
31450
31451
  const eventEmitter = new EventEmitter();
@@ -32128,6 +32129,7 @@ class WebrtcExtension extends EventEmitter {
32128
32129
  const pendingSession = this.pendingSessions[params.sessionId];
32129
32130
  if (pendingSession) {
32130
32131
  mediaSessionParams = Object.assign(Object.assign({}, commonParams), { meetingId: pendingSession.meetingId, fromUserId: pendingSession.fromUserId, originalRoomJid: pendingSession.originalRoomJid, privAnswerMode: pendingSession.privAnswerMode });
32132
+ delete this.pendingSessions[pendingSession.sessionId];
32131
32133
  }
32132
32134
  else {
32133
32135
  mediaSessionParams = commonParams;
@@ -32248,15 +32250,13 @@ class WebrtcExtension extends EventEmitter {
32248
32250
  }
32249
32251
  prepareSession(options) {
32250
32252
  const pendingSession = this.pendingSessions[options.sid];
32251
- // TODO: when we can safely remove the jingle session handling, this pending session
32252
- // will need to be deleted in the `handleGenesysOffer` fn.
32253
- if (pendingSession) {
32254
- delete this.pendingSessions[pendingSession.sessionId];
32255
- }
32256
32253
  if (pendingSession === null || pendingSession === void 0 ? void 0 : pendingSession.sdpOverXmpp) {
32257
32254
  this.logger.debug('skipping creation of jingle webrtc session due to sdpOverXmpp on the pendingSession');
32258
32255
  return;
32259
32256
  }
32257
+ if (pendingSession) {
32258
+ delete this.pendingSessions[pendingSession.sessionId];
32259
+ }
32260
32260
  const ignoreHostCandidatesForForceTurnFF = this.getIceTransportPolicy() === 'relay' && browserama_min.exports.isFirefox;
32261
32261
  const gcSessionOpts = {
32262
32262
  options,
@@ -31,6 +31,7 @@ export class GenesysCloudMediaSession {
31
31
  this.allowTCP = !!params.allowTCP;
32
32
  this.reinvite = !!params.reinvite;
33
33
  this.privAnswerMode = params.privAnswerMode;
34
+ this.meetingId = params.meetingId;
34
35
  // babel does not like the typescript recipe for multiple extends so we are hacking this one
35
36
  // referencing https://github.com/babel/babel/issues/798
36
37
  const eventEmitter = new EventEmitter();
package/dist/es/webrtc.js CHANGED
@@ -189,6 +189,7 @@ export class WebrtcExtension extends EventEmitter {
189
189
  const pendingSession = this.pendingSessions[params.sessionId];
190
190
  if (pendingSession) {
191
191
  mediaSessionParams = Object.assign(Object.assign({}, commonParams), { meetingId: pendingSession.meetingId, fromUserId: pendingSession.fromUserId, originalRoomJid: pendingSession.originalRoomJid, privAnswerMode: pendingSession.privAnswerMode });
192
+ delete this.pendingSessions[pendingSession.sessionId];
192
193
  }
193
194
  else {
194
195
  mediaSessionParams = commonParams;
@@ -309,15 +310,13 @@ export class WebrtcExtension extends EventEmitter {
309
310
  }
310
311
  prepareSession(options) {
311
312
  const pendingSession = this.pendingSessions[options.sid];
312
- // TODO: when we can safely remove the jingle session handling, this pending session
313
- // will need to be deleted in the `handleGenesysOffer` fn.
314
- if (pendingSession) {
315
- delete this.pendingSessions[pendingSession.sessionId];
316
- }
317
313
  if (pendingSession === null || pendingSession === void 0 ? void 0 : pendingSession.sdpOverXmpp) {
318
314
  this.logger.debug('skipping creation of jingle webrtc session due to sdpOverXmpp on the pendingSession');
319
315
  return;
320
316
  }
317
+ if (pendingSession) {
318
+ delete this.pendingSessions[pendingSession.sessionId];
319
+ }
321
320
  const ignoreHostCandidatesForForceTurnFF = this.getIceTransportPolicy() === 'relay' && isFirefox;
322
321
  const gcSessionOpts = {
323
322
  options,
@@ -5,12 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  # [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v18.0.0...HEAD)
8
- ### Changed
9
- * [STREAM-313](https://inindca.atlassian.net/browse/STREAM-313) - Streaming-client will ignore duplicate reinvite offers.
10
-
11
8
  ### Breaking Changes
12
9
  * Lru-cache was upgraded from v6 to v11, which uses newer language features. Depending on your language target version, you may need to configure a transpiler accordingly. For example, we added `plugin-proposal-class-properties` and `plugin-transform-private-methods` to our Babel config for streaming-client.
13
10
 
11
+ ### Changed
12
+ * [STREAM-313](https://inindca.atlassian.net/browse/STREAM-313) - Streaming-client will ignore duplicate reinvite offers.
13
+ * [PCM-2081](https://inindca.atlassian.net/browse/PCM-2081) - Set meetingId when initializing GenesysCloudMediaSessions and only delete pending sessions when processed for the right session type.
14
+
14
15
  ### Fixed
15
16
  * [STREAM-207](https://inindca.atlassian.net/browse/STREAM-207) - [STREAM-207] handle ice candidates received before the offer (sdpOverXmpp only)
16
17
 
@@ -34,6 +34,7 @@ class GenesysCloudMediaSession {
34
34
  this.allowTCP = !!params.allowTCP;
35
35
  this.reinvite = !!params.reinvite;
36
36
  this.privAnswerMode = params.privAnswerMode;
37
+ this.meetingId = params.meetingId;
37
38
  // babel does not like the typescript recipe for multiple extends so we are hacking this one
38
39
  // referencing https://github.com/babel/babel/issues/798
39
40
  const eventEmitter = new events_1.EventEmitter();
@@ -193,6 +193,7 @@ class WebrtcExtension extends events_1.EventEmitter {
193
193
  originalRoomJid: pendingSession.originalRoomJid,
194
194
  privAnswerMode: pendingSession.privAnswerMode
195
195
  };
196
+ delete this.pendingSessions[pendingSession.sessionId];
196
197
  }
197
198
  else {
198
199
  mediaSessionParams = commonParams;
@@ -300,15 +301,13 @@ class WebrtcExtension extends events_1.EventEmitter {
300
301
  }
301
302
  prepareSession(options) {
302
303
  const pendingSession = this.pendingSessions[options.sid];
303
- // TODO: when we can safely remove the jingle session handling, this pending session
304
- // will need to be deleted in the `handleGenesysOffer` fn.
305
- if (pendingSession) {
306
- delete this.pendingSessions[pendingSession.sessionId];
307
- }
308
304
  if (pendingSession === null || pendingSession === void 0 ? void 0 : pendingSession.sdpOverXmpp) {
309
305
  this.logger.debug('skipping creation of jingle webrtc session due to sdpOverXmpp on the pendingSession');
310
306
  return;
311
307
  }
308
+ if (pendingSession) {
309
+ delete this.pendingSessions[pendingSession.sessionId];
310
+ }
312
311
  const ignoreHostCandidatesForForceTurnFF = this.getIceTransportPolicy() === 'relay' && browserama_1.isFirefox;
313
312
  const gcSessionOpts = {
314
313
  options,