genesys-cloud-streaming-client 14.2.1-PCM-1993.2 → 14.2.1-develop.22

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.
@@ -45,6 +45,7 @@ function stanzaOptionsJwt(config) {
45
45
  }
46
46
  let wsHost = config.host.replace(/\/$/, '');
47
47
  let stanzaOptions = {
48
+ resource: config.jidResource,
48
49
  transports: {
49
50
  websocket: `${wsHost}/stream/jwt/${config.jwt}`
50
51
  },
@@ -55,9 +55,6 @@ export declare class WebrtcExtension extends EventEmitter {
55
55
  */
56
56
  private handlePropose;
57
57
  private handleRetract;
58
- /**
59
- * Inform the client that another client has already taken care of the pendingSession
60
- */
61
58
  private handledIncomingRtcSession;
62
59
  /**
63
60
  * Exposed Api
@@ -229,10 +229,7 @@ class WebrtcExtension extends events_1.EventEmitter {
229
229
  this.handleRetract(msg.retract.sessionId);
230
230
  }
231
231
  else if (msg.accept) {
232
- this.handledIncomingRtcSession(msg.accept.sessionId, msg);
233
- }
234
- else if (msg.reject) {
235
- this.handledIncomingRtcSession(msg.reject.sessionId, msg);
232
+ this.handledIncomingRtcSession(msg.accept.sessionId);
236
233
  }
237
234
  });
238
235
  }
@@ -315,12 +312,8 @@ class WebrtcExtension extends events_1.EventEmitter {
315
312
  delete this.pendingSessions[sessionId];
316
313
  return this.emit(events.CANCEL_INCOMING_RTCSESSION, sessionId);
317
314
  }
318
- /**
319
- * Inform the client that another client has already taken care of the pendingSession
320
- */
321
- handledIncomingRtcSession(sessionId, msg) {
322
- let acceptedOrRejected = msg.accept ? 'accept' : 'reject';
323
- this.logger.info(`${acceptedOrRejected} received`, this.getLogDetailsForPendingSessionId(sessionId));
315
+ handledIncomingRtcSession(sessionId) {
316
+ this.logger.info('accept received', this.getLogDetailsForPendingSessionId(sessionId));
324
317
  return this.emit(events.HANDLED_INCOMING_RTCSESSION, sessionId);
325
318
  }
326
319
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "developercenter-cdn/streaming-client",
3
- "version": "PCM-1993",
3
+ "version": "14.2.1",
4
4
  "ecosystem": "pc",
5
5
  "team": "Genesys Client Media (WebRTC)",
6
6
  "indexFiles": [
@@ -17,6 +17,6 @@
17
17
  "file": "/v14/streaming-client.browser.js"
18
18
  }
19
19
  ],
20
- "build": "2",
21
- "buildDate": "2022-09-16T17:29:16.258978Z"
20
+ "build": "22",
21
+ "buildDate": "2022-09-19T17:29:15.828443Z"
22
22
  }
package/dist/es/client.js CHANGED
@@ -44,6 +44,7 @@ function stanzaOptionsJwt(config) {
44
44
  }
45
45
  let wsHost = config.host.replace(/\/$/, '');
46
46
  let stanzaOptions = {
47
+ resource: config.jidResource,
47
48
  transports: {
48
49
  websocket: `${wsHost}/stream/jwt/${config.jwt}`
49
50
  },
@@ -41855,10 +41855,7 @@ class WebrtcExtension extends EventEmitter {
41855
41855
  this.handleRetract(msg.retract.sessionId);
41856
41856
  }
41857
41857
  else if (msg.accept) {
41858
- this.handledIncomingRtcSession(msg.accept.sessionId, msg);
41859
- }
41860
- else if (msg.reject) {
41861
- this.handledIncomingRtcSession(msg.reject.sessionId, msg);
41858
+ this.handledIncomingRtcSession(msg.accept.sessionId);
41862
41859
  }
41863
41860
  }));
41864
41861
  }
@@ -41938,12 +41935,8 @@ class WebrtcExtension extends EventEmitter {
41938
41935
  delete this.pendingSessions[sessionId];
41939
41936
  return this.emit(events.CANCEL_INCOMING_RTCSESSION, sessionId);
41940
41937
  }
41941
- /**
41942
- * Inform the client that another client has already taken care of the pendingSession
41943
- */
41944
- handledIncomingRtcSession(sessionId, msg) {
41945
- let acceptedOrRejected = msg.accept ? 'accept' : 'reject';
41946
- this.logger.info(`${acceptedOrRejected} received`, this.getLogDetailsForPendingSessionId(sessionId));
41938
+ handledIncomingRtcSession(sessionId) {
41939
+ this.logger.info('accept received', this.getLogDetailsForPendingSessionId(sessionId));
41947
41940
  return this.emit(events.HANDLED_INCOMING_RTCSESSION, sessionId);
41948
41941
  }
41949
41942
  /**
@@ -43220,6 +43213,7 @@ function stanzaOptionsJwt(config) {
43220
43213
  }
43221
43214
  let wsHost = config.host.replace(/\/$/, '');
43222
43215
  let stanzaOptions = {
43216
+ resource: config.jidResource,
43223
43217
  transports: {
43224
43218
  websocket: `${wsHost}/stream/jwt/${config.jwt}`
43225
43219
  },
@@ -55,9 +55,6 @@ export declare class WebrtcExtension extends EventEmitter {
55
55
  */
56
56
  private handlePropose;
57
57
  private handleRetract;
58
- /**
59
- * Inform the client that another client has already taken care of the pendingSession
60
- */
61
58
  private handledIncomingRtcSession;
62
59
  /**
63
60
  * Exposed Api
package/dist/es/webrtc.js CHANGED
@@ -228,10 +228,7 @@ export class WebrtcExtension extends EventEmitter {
228
228
  this.handleRetract(msg.retract.sessionId);
229
229
  }
230
230
  else if (msg.accept) {
231
- this.handledIncomingRtcSession(msg.accept.sessionId, msg);
232
- }
233
- else if (msg.reject) {
234
- this.handledIncomingRtcSession(msg.reject.sessionId, msg);
231
+ this.handledIncomingRtcSession(msg.accept.sessionId);
235
232
  }
236
233
  }));
237
234
  }
@@ -311,12 +308,8 @@ export class WebrtcExtension extends EventEmitter {
311
308
  delete this.pendingSessions[sessionId];
312
309
  return this.emit(events.CANCEL_INCOMING_RTCSESSION, sessionId);
313
310
  }
314
- /**
315
- * Inform the client that another client has already taken care of the pendingSession
316
- */
317
- handledIncomingRtcSession(sessionId, msg) {
318
- let acceptedOrRejected = msg.accept ? 'accept' : 'reject';
319
- this.logger.info(`${acceptedOrRejected} received`, this.getLogDetailsForPendingSessionId(sessionId));
311
+ handledIncomingRtcSession(sessionId) {
312
+ this.logger.info('accept received', this.getLogDetailsForPendingSessionId(sessionId));
320
313
  return this.emit(events.HANDLED_INCOMING_RTCSESSION, sessionId);
321
314
  }
322
315
  /**
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
4
4
  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
  # [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v14.2.0...HEAD)
7
- * [PCM-1993](https://inindca.atlassian.net/browse/PCM-1993) - Handled `reject` messages and treat the corresponding session as handled
7
+ * [PCM-1988](https://inindca.atlassian.net/browse/PCM-1988) – Add jidResource support for jwt tokens.
8
8
 
9
9
  ### Added
10
10
  * [PCM-1972](https://inindca.atlassian.net/browse/PCM-1972) – Added support for data channel messages if initially offered in the sdp
@@ -45,6 +45,7 @@ function stanzaOptionsJwt(config) {
45
45
  }
46
46
  let wsHost = config.host.replace(/\/$/, '');
47
47
  let stanzaOptions = {
48
+ resource: config.jidResource,
48
49
  transports: {
49
50
  websocket: `${wsHost}/stream/jwt/${config.jwt}`
50
51
  },
@@ -55,9 +55,6 @@ export declare class WebrtcExtension extends EventEmitter {
55
55
  */
56
56
  private handlePropose;
57
57
  private handleRetract;
58
- /**
59
- * Inform the client that another client has already taken care of the pendingSession
60
- */
61
58
  private handledIncomingRtcSession;
62
59
  /**
63
60
  * Exposed Api
@@ -229,10 +229,7 @@ class WebrtcExtension extends events_1.EventEmitter {
229
229
  this.handleRetract(msg.retract.sessionId);
230
230
  }
231
231
  else if (msg.accept) {
232
- this.handledIncomingRtcSession(msg.accept.sessionId, msg);
233
- }
234
- else if (msg.reject) {
235
- this.handledIncomingRtcSession(msg.reject.sessionId, msg);
232
+ this.handledIncomingRtcSession(msg.accept.sessionId);
236
233
  }
237
234
  });
238
235
  }
@@ -315,12 +312,8 @@ class WebrtcExtension extends events_1.EventEmitter {
315
312
  delete this.pendingSessions[sessionId];
316
313
  return this.emit(events.CANCEL_INCOMING_RTCSESSION, sessionId);
317
314
  }
318
- /**
319
- * Inform the client that another client has already taken care of the pendingSession
320
- */
321
- handledIncomingRtcSession(sessionId, msg) {
322
- let acceptedOrRejected = msg.accept ? 'accept' : 'reject';
323
- this.logger.info(`${acceptedOrRejected} received`, this.getLogDetailsForPendingSessionId(sessionId));
315
+ handledIncomingRtcSession(sessionId) {
316
+ this.logger.info('accept received', this.getLogDetailsForPendingSessionId(sessionId));
324
317
  return this.emit(events.HANDLED_INCOMING_RTCSESSION, sessionId);
325
318
  }
326
319
  /**