genesys-cloud-streaming-client 14.2.2-develop.25 → 14.2.3

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.
@@ -376,7 +376,7 @@ class Client {
376
376
  return Client.version;
377
377
  }
378
378
  static get version() {
379
- return '14.2.2';
379
+ return '14.2.3';
380
380
  }
381
381
  }
382
382
  exports.Client = Client;
@@ -22,6 +22,7 @@ export declare class GenesysCloudMediaSession extends MediaSession {
22
22
  private statsGatherer?;
23
23
  private iceCandidatesDiscovered;
24
24
  private iceCandidatesReceivedFromPeer;
25
+ private interruptionStart?;
25
26
  conversationId?: string;
26
27
  id?: string;
27
28
  fromUserId?: string;
@@ -111,8 +111,16 @@ class GenesysCloudMediaSession extends jingle_1.MediaSession {
111
111
  const iceState = this.pc.iceConnectionState;
112
112
  const sessionId = this.id;
113
113
  const conversationId = this.conversationId;
114
+ const sessionType = this.sessionType;
114
115
  this._log('info', 'ICE state changed: ', { iceState, sessionId, conversationId });
115
- if (iceState === 'connected') {
116
+ if (iceState === 'disconnected') {
117
+ // this means we actually connected at one point
118
+ if (this.pc.signalingState === 'stable') {
119
+ this.interruptionStart = new Date();
120
+ this._log('info', 'Connection state is interrupted', { sessionId, conversationId, sessionType });
121
+ }
122
+ }
123
+ else if (iceState === 'connected') {
116
124
  this._log('info', 'sending session-info: active');
117
125
  this.send(Constants_1.JingleAction.SessionInfo, {
118
126
  info: {
@@ -130,7 +138,21 @@ class GenesysCloudMediaSession extends jingle_1.MediaSession {
130
138
  super.onIceStateChange();
131
139
  }
132
140
  onConnectionStateChange() {
133
- this._log('info', 'Connection state changed: ', { connectionState: this.pc.connectionState });
141
+ const connectionState = this.pc.connectionState;
142
+ const sessionId = this.id;
143
+ const conversationId = this.conversationId;
144
+ const sessionType = this.sessionType;
145
+ this._log('info', 'Connection state changed: ', { connectionState, sessionId, conversationId, sessionType });
146
+ if (this.interruptionStart) {
147
+ if (connectionState === 'connected') {
148
+ const diff = new Date().getTime() - this.interruptionStart.getTime();
149
+ this._log('info', 'Connection was interrupted but was successfully recovered/connected', { sessionId, conversationId, sessionType, timeToRecover: diff });
150
+ this.interruptionStart = undefined;
151
+ }
152
+ else if (connectionState === 'failed') {
153
+ this._log('info', 'Connection was interrupted and failed to recover', { sessionId, conversationId, sessionType });
154
+ }
155
+ }
134
156
  }
135
157
  onIceCandidateError(event) {
136
158
  this._log('error', 'IceCandidateError', {
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "developercenter-cdn/streaming-client",
3
- "version": "14.2.2",
3
+ "version": "14.2.3",
4
4
  "ecosystem": "pc",
5
5
  "team": "Genesys Client Media (WebRTC)",
6
6
  "indexFiles": [
7
7
  {
8
- "file": "/v14.2.2/streaming-client.browser.ie.js"
8
+ "file": "/v14.2.3/streaming-client.browser.ie.js"
9
9
  },
10
10
  {
11
- "file": "/v14.2.2/streaming-client.browser.js"
11
+ "file": "/v14.2.3/streaming-client.browser.js"
12
12
  },
13
13
  {
14
14
  "file": "/v14/streaming-client.browser.ie.js"
@@ -17,6 +17,6 @@
17
17
  "file": "/v14/streaming-client.browser.js"
18
18
  }
19
19
  ],
20
- "build": "25",
21
- "buildDate": "2022-09-24T01:29:17.376712Z"
20
+ "build": "45",
21
+ "buildDate": "2022-10-04T16:06:11.176751Z"
22
22
  }
package/dist/es/client.js CHANGED
@@ -377,6 +377,6 @@ export class Client {
377
377
  return Client.version;
378
378
  }
379
379
  static get version() {
380
- return '14.2.2';
380
+ return '14.2.3';
381
381
  }
382
382
  }
@@ -41538,8 +41538,16 @@ class GenesysCloudMediaSession extends jingle.MediaSession {
41538
41538
  const iceState = this.pc.iceConnectionState;
41539
41539
  const sessionId = this.id;
41540
41540
  const conversationId = this.conversationId;
41541
+ const sessionType = this.sessionType;
41541
41542
  this._log('info', 'ICE state changed: ', { iceState, sessionId, conversationId });
41542
- if (iceState === 'connected') {
41543
+ if (iceState === 'disconnected') {
41544
+ // this means we actually connected at one point
41545
+ if (this.pc.signalingState === 'stable') {
41546
+ this.interruptionStart = new Date();
41547
+ this._log('info', 'Connection state is interrupted', { sessionId, conversationId, sessionType });
41548
+ }
41549
+ }
41550
+ else if (iceState === 'connected') {
41543
41551
  this._log('info', 'sending session-info: active');
41544
41552
  this.send(Constants.JingleAction.SessionInfo, {
41545
41553
  info: {
@@ -41557,7 +41565,21 @@ class GenesysCloudMediaSession extends jingle.MediaSession {
41557
41565
  super.onIceStateChange();
41558
41566
  }
41559
41567
  onConnectionStateChange() {
41560
- this._log('info', 'Connection state changed: ', { connectionState: this.pc.connectionState });
41568
+ const connectionState = this.pc.connectionState;
41569
+ const sessionId = this.id;
41570
+ const conversationId = this.conversationId;
41571
+ const sessionType = this.sessionType;
41572
+ this._log('info', 'Connection state changed: ', { connectionState, sessionId, conversationId, sessionType });
41573
+ if (this.interruptionStart) {
41574
+ if (connectionState === 'connected') {
41575
+ const diff = new Date().getTime() - this.interruptionStart.getTime();
41576
+ this._log('info', 'Connection was interrupted but was successfully recovered/connected', { sessionId, conversationId, sessionType, timeToRecover: diff });
41577
+ this.interruptionStart = undefined;
41578
+ }
41579
+ else if (connectionState === 'failed') {
41580
+ this._log('info', 'Connection was interrupted and failed to recover', { sessionId, conversationId, sessionType });
41581
+ }
41582
+ }
41561
41583
  }
41562
41584
  onIceCandidateError(event) {
41563
41585
  this._log('error', 'IceCandidateError', {
@@ -43627,7 +43649,7 @@ class Client {
43627
43649
  return Client.version;
43628
43650
  }
43629
43651
  static get version() {
43630
- return '14.2.2';
43652
+ return '14.2.3';
43631
43653
  }
43632
43654
  }
43633
43655
 
@@ -22,6 +22,7 @@ export declare class GenesysCloudMediaSession extends MediaSession {
22
22
  private statsGatherer?;
23
23
  private iceCandidatesDiscovered;
24
24
  private iceCandidatesReceivedFromPeer;
25
+ private interruptionStart?;
25
26
  conversationId?: string;
26
27
  id?: string;
27
28
  fromUserId?: string;
@@ -113,8 +113,16 @@ export class GenesysCloudMediaSession extends MediaSession {
113
113
  const iceState = this.pc.iceConnectionState;
114
114
  const sessionId = this.id;
115
115
  const conversationId = this.conversationId;
116
+ const sessionType = this.sessionType;
116
117
  this._log('info', 'ICE state changed: ', { iceState, sessionId, conversationId });
117
- if (iceState === 'connected') {
118
+ if (iceState === 'disconnected') {
119
+ // this means we actually connected at one point
120
+ if (this.pc.signalingState === 'stable') {
121
+ this.interruptionStart = new Date();
122
+ this._log('info', 'Connection state is interrupted', { sessionId, conversationId, sessionType });
123
+ }
124
+ }
125
+ else if (iceState === 'connected') {
118
126
  this._log('info', 'sending session-info: active');
119
127
  this.send(JingleAction.SessionInfo, {
120
128
  info: {
@@ -132,7 +140,21 @@ export class GenesysCloudMediaSession extends MediaSession {
132
140
  super.onIceStateChange();
133
141
  }
134
142
  onConnectionStateChange() {
135
- this._log('info', 'Connection state changed: ', { connectionState: this.pc.connectionState });
143
+ const connectionState = this.pc.connectionState;
144
+ const sessionId = this.id;
145
+ const conversationId = this.conversationId;
146
+ const sessionType = this.sessionType;
147
+ this._log('info', 'Connection state changed: ', { connectionState, sessionId, conversationId, sessionType });
148
+ if (this.interruptionStart) {
149
+ if (connectionState === 'connected') {
150
+ const diff = new Date().getTime() - this.interruptionStart.getTime();
151
+ this._log('info', 'Connection was interrupted but was successfully recovered/connected', { sessionId, conversationId, sessionType, timeToRecover: diff });
152
+ this.interruptionStart = undefined;
153
+ }
154
+ else if (connectionState === 'failed') {
155
+ this._log('info', 'Connection was interrupted and failed to recover', { sessionId, conversationId, sessionType });
156
+ }
157
+ }
136
158
  }
137
159
  onIceCandidateError(event) {
138
160
  this._log('error', 'IceCandidateError', {
@@ -4,9 +4,15 @@ 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
 
7
- # [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v14.2.1...HEAD)
7
+ # [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v14.2.3...HEAD)
8
+
9
+ # [v14.2.3](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v14.2.2...v14.2.3)
10
+ * [PCM-1968](https://inindca.atlassian.net/browse/PCM-1968) - More verbose logging around interruption states
11
+
12
+ # [v14.2.2](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v14.2.1...v14.2.2)
8
13
  * [PCM-1993](https://inindca.atlassian.net/browse/PCM-1993) - Handled `reject` messages and treat the corresponding session as handled
9
14
 
15
+
10
16
  # [v14.2.1](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v14.2.0...v14.2.1)
11
17
  * [PCM-1988](https://inindca.atlassian.net/browse/PCM-1988) – Add jidResource support for jwt tokens.
12
18
  * [PCM-1992](https://inindca.atlassian.net/browse/PCM-1992) – Update to the latest logger so unsent logs get preserved.
@@ -376,7 +376,7 @@ class Client {
376
376
  return Client.version;
377
377
  }
378
378
  static get version() {
379
- return '14.2.2';
379
+ return '14.2.3';
380
380
  }
381
381
  }
382
382
  exports.Client = Client;
@@ -22,6 +22,7 @@ export declare class GenesysCloudMediaSession extends MediaSession {
22
22
  private statsGatherer?;
23
23
  private iceCandidatesDiscovered;
24
24
  private iceCandidatesReceivedFromPeer;
25
+ private interruptionStart?;
25
26
  conversationId?: string;
26
27
  id?: string;
27
28
  fromUserId?: string;
@@ -111,8 +111,16 @@ class GenesysCloudMediaSession extends jingle_1.MediaSession {
111
111
  const iceState = this.pc.iceConnectionState;
112
112
  const sessionId = this.id;
113
113
  const conversationId = this.conversationId;
114
+ const sessionType = this.sessionType;
114
115
  this._log('info', 'ICE state changed: ', { iceState, sessionId, conversationId });
115
- if (iceState === 'connected') {
116
+ if (iceState === 'disconnected') {
117
+ // this means we actually connected at one point
118
+ if (this.pc.signalingState === 'stable') {
119
+ this.interruptionStart = new Date();
120
+ this._log('info', 'Connection state is interrupted', { sessionId, conversationId, sessionType });
121
+ }
122
+ }
123
+ else if (iceState === 'connected') {
116
124
  this._log('info', 'sending session-info: active');
117
125
  this.send(Constants_1.JingleAction.SessionInfo, {
118
126
  info: {
@@ -130,7 +138,21 @@ class GenesysCloudMediaSession extends jingle_1.MediaSession {
130
138
  super.onIceStateChange();
131
139
  }
132
140
  onConnectionStateChange() {
133
- this._log('info', 'Connection state changed: ', { connectionState: this.pc.connectionState });
141
+ const connectionState = this.pc.connectionState;
142
+ const sessionId = this.id;
143
+ const conversationId = this.conversationId;
144
+ const sessionType = this.sessionType;
145
+ this._log('info', 'Connection state changed: ', { connectionState, sessionId, conversationId, sessionType });
146
+ if (this.interruptionStart) {
147
+ if (connectionState === 'connected') {
148
+ const diff = new Date().getTime() - this.interruptionStart.getTime();
149
+ this._log('info', 'Connection was interrupted but was successfully recovered/connected', { sessionId, conversationId, sessionType, timeToRecover: diff });
150
+ this.interruptionStart = undefined;
151
+ }
152
+ else if (connectionState === 'failed') {
153
+ this._log('info', 'Connection was interrupted and failed to recover', { sessionId, conversationId, sessionType });
154
+ }
155
+ }
134
156
  }
135
157
  onIceCandidateError(event) {
136
158
  this._log('error', 'IceCandidateError', {