genesys-cloud-streaming-client 19.6.1-develop.17 → 19.7.0-uuid-fix.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.
- package/dist/cjs/alerting-leader.d.ts +0 -1
- package/dist/cjs/client.d.ts +0 -1
- package/dist/cjs/client.js +3 -2
- package/dist/cjs/http-client.js +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/messenger.d.ts +3 -3
- package/dist/cjs/stats-formatter.js +2 -3
- package/dist/cjs/types/interfaces.d.ts +37 -37
- package/dist/cjs/types/interfaces.js +3 -3
- package/dist/cjs/types/media-session.d.ts +2 -3
- package/dist/cjs/utils.d.ts +1 -1
- package/dist/cjs/utils.js +9 -9
- package/dist/cjs/webrtc.d.ts +0 -1
- package/dist/cjs/webrtc.js +12 -12
- package/dist/deploy-info.json +5 -5
- package/dist/es/alerting-leader.d.ts +0 -1
- package/dist/es/client.d.ts +0 -1
- package/dist/es/client.js +7 -6
- package/dist/es/http-client.js +1 -1
- package/dist/es/index.bundle.js +85 -498
- package/dist/es/index.d.ts +0 -1
- package/dist/es/messenger.d.ts +3 -3
- package/dist/es/notifications.js +3 -3
- package/dist/es/ping.js +1 -1
- package/dist/es/types/genesys-cloud-media-session.js +2 -2
- package/dist/es/types/interfaces.d.ts +37 -37
- package/dist/es/types/media-session.d.ts +2 -3
- package/dist/es/types/stanza-media-session.js +3 -3
- package/dist/es/utils.d.ts +1 -1
- package/dist/es/webrtc.d.ts +0 -1
- package/dist/es/webrtc.js +15 -15
- package/dist/manifest.json +5 -5
- package/dist/npm/CHANGELOG.md +11 -2
- package/dist/npm/alerting-leader.d.ts +0 -1
- package/dist/npm/client.d.ts +0 -1
- package/dist/npm/client.js +3 -2
- package/dist/npm/http-client.js +1 -1
- package/dist/npm/index.d.ts +0 -1
- package/dist/npm/messenger.d.ts +3 -3
- package/dist/npm/stats-formatter.js +2 -3
- package/dist/npm/types/interfaces.d.ts +37 -37
- package/dist/npm/types/interfaces.js +3 -3
- package/dist/npm/types/media-session.d.ts +2 -3
- package/dist/npm/utils.d.ts +1 -1
- package/dist/npm/utils.js +9 -9
- package/dist/npm/webrtc.d.ts +0 -1
- package/dist/npm/webrtc.js +12 -12
- package/dist/streaming-client.browser.js +1 -1
- package/dist/v19/streaming-client.browser.js +1 -1
- package/dist/v19.7.0/streaming-client.browser.js +2 -0
- package/package.json +10 -9
- package/dist/v19.6.1/streaming-client.browser.js +0 -2
- /package/dist/{v19.6.1 → v19.7.0}/streaming-client.browser.js.LICENSE.txt +0 -0
package/dist/cjs/client.d.ts
CHANGED
package/dist/cjs/client.js
CHANGED
|
@@ -59,10 +59,11 @@ class Client extends events_1.default {
|
|
|
59
59
|
jwt: options.jwt,
|
|
60
60
|
jid: options.jid,
|
|
61
61
|
jidResource: options.jidResource,
|
|
62
|
-
channelId: null,
|
|
62
|
+
channelId: null, // created on connect
|
|
63
63
|
appName: options.appName,
|
|
64
64
|
appVersion: options.appVersion,
|
|
65
65
|
appId: options.appId,
|
|
66
|
+
logLevel: options.logLevel,
|
|
66
67
|
customHeaders: options.customHeaders
|
|
67
68
|
};
|
|
68
69
|
this.backgroundAssistantMode = this.checkIsBackgroundAssistant();
|
|
@@ -670,7 +671,7 @@ class Client extends events_1.default {
|
|
|
670
671
|
return Client.version;
|
|
671
672
|
}
|
|
672
673
|
static get version() {
|
|
673
|
-
return '19.
|
|
674
|
+
return '19.7.0';
|
|
674
675
|
}
|
|
675
676
|
}
|
|
676
677
|
exports.Client = Client;
|
package/dist/cjs/http-client.js
CHANGED
|
@@ -160,7 +160,7 @@ class HttpClient {
|
|
|
160
160
|
// responseBody: res.text,
|
|
161
161
|
// requestBody: res.req._data,
|
|
162
162
|
// url: res.error.url,
|
|
163
|
-
message: 'Error making HTTP request',
|
|
163
|
+
message: 'Error making HTTP request', // res.error.message,
|
|
164
164
|
method: res.req.method,
|
|
165
165
|
name: res.error.name,
|
|
166
166
|
stack: res.error.stack
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/messenger.d.ts
CHANGED
|
@@ -3,17 +3,17 @@ import { Client } from './client';
|
|
|
3
3
|
import { NamedAgent } from './types/named-agent';
|
|
4
4
|
import { GenesysMediaMessage, StreamingClientExtension } from './types/interfaces';
|
|
5
5
|
import { Emitter } from 'strict-event-emitter';
|
|
6
|
-
|
|
6
|
+
type MessageWithMediaMessage = {
|
|
7
7
|
from?: string;
|
|
8
8
|
id?: string;
|
|
9
9
|
to?: string;
|
|
10
10
|
mediaMessage: GenesysMediaMessage;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type MediaMessageEvent = MessageWithMediaMessage & {
|
|
13
13
|
fromMyUser: boolean;
|
|
14
14
|
fromMyClient: boolean;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type MessengerEvents = {
|
|
17
17
|
mediaMessage: [MediaMessageEvent];
|
|
18
18
|
};
|
|
19
19
|
export declare class MessengerExtension extends Emitter<MessengerEvents> implements StreamingClientExtension {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatStatsEvent = formatStatsEvent;
|
|
4
|
+
exports.deepFlatten = deepFlatten;
|
|
4
5
|
function isGetStatsEvent(event) {
|
|
5
6
|
return event.name === 'getStats';
|
|
6
7
|
}
|
|
@@ -31,7 +32,6 @@ function formatStatsEvent(event, extraDetails = {}) {
|
|
|
31
32
|
};
|
|
32
33
|
return formattedEvent;
|
|
33
34
|
}
|
|
34
|
-
exports.formatStatsEvent = formatStatsEvent;
|
|
35
35
|
function deepFlatten(obj, prefix = '') {
|
|
36
36
|
const flatObj = {};
|
|
37
37
|
if (Array.isArray(obj)) {
|
|
@@ -60,4 +60,3 @@ function deepFlatten(obj, prefix = '') {
|
|
|
60
60
|
}
|
|
61
61
|
return flatObj;
|
|
62
62
|
}
|
|
63
|
-
exports.deepFlatten = deepFlatten;
|
|
@@ -75,7 +75,7 @@ export interface IHttpClientOptions {
|
|
|
75
75
|
export interface ExtendedRTCIceServer extends RTCIceServer {
|
|
76
76
|
type: string;
|
|
77
77
|
}
|
|
78
|
-
export
|
|
78
|
+
export type RequestApiOptions = {
|
|
79
79
|
method: 'get' | 'post' | 'patch' | 'put' | 'delete';
|
|
80
80
|
host: string;
|
|
81
81
|
data?: any;
|
|
@@ -145,7 +145,7 @@ export interface IError {
|
|
|
145
145
|
name: string;
|
|
146
146
|
stack?: string;
|
|
147
147
|
}
|
|
148
|
-
export
|
|
148
|
+
export type SessionTypesAsStrings = 'softphone' | 'screenShare' | 'screenRecording' | 'liveScreenMonitoring' | 'collaborateVideo' | 'unknown';
|
|
149
149
|
export declare enum SessionTypes {
|
|
150
150
|
softphone = "softphone",
|
|
151
151
|
collaborateVideo = "collaborateVideo",
|
|
@@ -189,75 +189,75 @@ export interface StreamingClientConnectOptions {
|
|
|
189
189
|
export interface StreamingSubscriptionErrorDetails {
|
|
190
190
|
missingPermissions?: string[];
|
|
191
191
|
}
|
|
192
|
-
export
|
|
192
|
+
export type GenesysWebrtcBaseParams = {
|
|
193
193
|
sessionId: string;
|
|
194
194
|
};
|
|
195
|
-
export
|
|
195
|
+
export type GenesysWebrtcSdpParams = GenesysWebrtcBaseParams & {
|
|
196
196
|
sdp: string;
|
|
197
197
|
};
|
|
198
|
-
export
|
|
198
|
+
export type GenesysWebrtcOfferParams = GenesysWebrtcSdpParams & {
|
|
199
199
|
conversationId: string;
|
|
200
200
|
reinvite?: boolean;
|
|
201
201
|
};
|
|
202
|
-
export
|
|
202
|
+
export type GenesysInfoActiveParams = GenesysWebrtcBaseParams & {
|
|
203
203
|
status: 'active';
|
|
204
204
|
};
|
|
205
|
-
export
|
|
205
|
+
export type GenesysSessionTerminateParams = GenesysWebrtcBaseParams & {
|
|
206
206
|
reason?: JingleReasonCondition;
|
|
207
207
|
};
|
|
208
|
-
export
|
|
208
|
+
export type GenesysWebrtcMuteParams = GenesysWebrtcBaseParams & {
|
|
209
209
|
type: 'audio' | 'video';
|
|
210
210
|
};
|
|
211
|
-
export
|
|
211
|
+
export type TypedJsonRpcMessage<Method extends string, Params> = {
|
|
212
212
|
jsonrpc: string;
|
|
213
213
|
method: Method;
|
|
214
214
|
id?: string;
|
|
215
215
|
params?: Params;
|
|
216
216
|
};
|
|
217
|
-
export
|
|
218
|
-
export
|
|
219
|
-
export
|
|
220
|
-
export
|
|
221
|
-
export
|
|
222
|
-
export
|
|
223
|
-
export
|
|
224
|
-
export
|
|
225
|
-
export
|
|
226
|
-
export
|
|
227
|
-
export
|
|
228
|
-
export
|
|
217
|
+
export type JsonRpcMessage = TypedJsonRpcMessage<string, any>;
|
|
218
|
+
export type GenesysWebrtcOffer = TypedJsonRpcMessage<'offer', GenesysWebrtcOfferParams>;
|
|
219
|
+
export type GenesysWebrtcAnswer = TypedJsonRpcMessage<'answer', GenesysWebrtcSdpParams>;
|
|
220
|
+
export type GenesysWebrtcInfo = TypedJsonRpcMessage<'info', GenesysInfoActiveParams>;
|
|
221
|
+
export type GenesysWebrtcIceCandidate = TypedJsonRpcMessage<'iceCandidate', GenesysWebrtcSdpParams>;
|
|
222
|
+
export type GenesysWebrtcTerminate = TypedJsonRpcMessage<'terminate', GenesysSessionTerminateParams>;
|
|
223
|
+
export type GenesysWebrtcMute = TypedJsonRpcMessage<'mute', GenesysWebrtcMuteParams>;
|
|
224
|
+
export type GenesysWebrtcUnmute = TypedJsonRpcMessage<'unmute', GenesysWebrtcMuteParams>;
|
|
225
|
+
export type GenesysWebrtcJsonRpcMessage = GenesysWebrtcOffer | GenesysWebrtcAnswer | GenesysWebrtcInfo | GenesysWebrtcIceCandidate | GenesysWebrtcTerminate | GenesysWebrtcMute | GenesysWebrtcUnmute;
|
|
226
|
+
export type HeadsetControlsRequestType = 'mediaHelper' | 'standard' | 'prioritized';
|
|
227
|
+
export type HeadsetControlsRejectionReason = 'activeCall' | 'mediaHelper' | 'priority';
|
|
228
|
+
export type HeadsetControlsRejectionParams = {
|
|
229
229
|
requestId: string;
|
|
230
230
|
reason: HeadsetControlsRejectionReason;
|
|
231
231
|
};
|
|
232
|
-
export
|
|
232
|
+
export type HeadsetControlsChangedParams = {
|
|
233
233
|
hasControls: boolean;
|
|
234
234
|
};
|
|
235
|
-
export
|
|
235
|
+
export type HeadsetControlsRequest = TypedJsonRpcMessage<'headsetControlsRequest', {
|
|
236
236
|
requestType: HeadsetControlsRequestType;
|
|
237
237
|
}>;
|
|
238
|
-
export
|
|
239
|
-
export
|
|
240
|
-
export
|
|
241
|
-
export
|
|
238
|
+
export type HeadsetControlsRejection = TypedJsonRpcMessage<'headsetControlsRejection', HeadsetControlsRejectionParams>;
|
|
239
|
+
export type HeadsetControlsChanged = TypedJsonRpcMessage<'headsetControlsChanged', HeadsetControlsChangedParams>;
|
|
240
|
+
export type GenesysMediaMessage = HeadsetControlsRequest | HeadsetControlsRejection | HeadsetControlsChanged;
|
|
241
|
+
export type FlatObject = {
|
|
242
242
|
[key: string]: string | number | boolean | null | Date;
|
|
243
243
|
};
|
|
244
|
-
export
|
|
244
|
+
export type GenericAction = {
|
|
245
245
|
_eventType: string;
|
|
246
246
|
};
|
|
247
|
-
export
|
|
247
|
+
export type InsightReport = {
|
|
248
248
|
appName: string;
|
|
249
249
|
appVersion: string;
|
|
250
250
|
originAppName?: string;
|
|
251
251
|
originAppVersion?: string;
|
|
252
252
|
actions: InsightAction<any>[];
|
|
253
253
|
};
|
|
254
|
-
export
|
|
254
|
+
export type InsightAction<T extends {
|
|
255
255
|
_eventType: string;
|
|
256
256
|
}> = {
|
|
257
257
|
actionName: 'WebrtcStats';
|
|
258
258
|
details: InsightActionDetails<T>;
|
|
259
259
|
};
|
|
260
|
-
export
|
|
260
|
+
export type InsightActionDetails<K extends {
|
|
261
261
|
_eventType: string;
|
|
262
262
|
}> = {
|
|
263
263
|
_eventType: K['_eventType'];
|
|
@@ -269,11 +269,11 @@ export declare type InsightActionDetails<K extends {
|
|
|
269
269
|
_appName?: string;
|
|
270
270
|
_appVersion?: string;
|
|
271
271
|
} & K;
|
|
272
|
-
export
|
|
272
|
+
export type OnlineStatusStat = InsightAction<{
|
|
273
273
|
_eventType: 'onlineStatus';
|
|
274
274
|
online: boolean;
|
|
275
275
|
}>;
|
|
276
|
-
export
|
|
276
|
+
export type FirstProposeStat = InsightAction<{
|
|
277
277
|
_eventType: 'firstPropose';
|
|
278
278
|
sdpViaXmppRequested: boolean;
|
|
279
279
|
sessionType: SessionTypesAsStrings;
|
|
@@ -281,12 +281,12 @@ export declare type FirstProposeStat = InsightAction<{
|
|
|
281
281
|
conversationId: string;
|
|
282
282
|
sessionId: string;
|
|
283
283
|
}>;
|
|
284
|
-
export
|
|
284
|
+
export type FirstAlertingConversationStat = InsightAction<{
|
|
285
285
|
_eventType: 'firstAlertingConversationUpdate';
|
|
286
286
|
conversationId: string;
|
|
287
287
|
participantId: string;
|
|
288
288
|
}>;
|
|
289
|
-
export
|
|
289
|
+
export type MediaStat = InsightAction<{
|
|
290
290
|
_eventType: 'mediaRequested' | 'mediaStarted' | 'mediaError';
|
|
291
291
|
requestId?: string;
|
|
292
292
|
message?: string;
|
|
@@ -298,8 +298,8 @@ export declare type MediaStat = InsightAction<{
|
|
|
298
298
|
sessionId?: string;
|
|
299
299
|
elapsedMsFromInitialRequest?: number;
|
|
300
300
|
}>;
|
|
301
|
-
export
|
|
302
|
-
export
|
|
301
|
+
export type NRProxyStat = FirstAlertingConversationStat | MediaStat;
|
|
302
|
+
export type SCConnectionData = {
|
|
303
303
|
currentDelayMs: number;
|
|
304
304
|
delayMsAfterNextReduction?: number;
|
|
305
305
|
nextDelayReductionTime?: number;
|
|
@@ -4,13 +4,13 @@ exports.SessionTypes = exports.StreamingClientErrorTypes = exports.AlertableInte
|
|
|
4
4
|
var AlertableInteractionTypes;
|
|
5
5
|
(function (AlertableInteractionTypes) {
|
|
6
6
|
AlertableInteractionTypes["voice"] = "voice";
|
|
7
|
-
})(AlertableInteractionTypes
|
|
7
|
+
})(AlertableInteractionTypes || (exports.AlertableInteractionTypes = AlertableInteractionTypes = {}));
|
|
8
8
|
var StreamingClientErrorTypes;
|
|
9
9
|
(function (StreamingClientErrorTypes) {
|
|
10
10
|
StreamingClientErrorTypes["generic"] = "generic";
|
|
11
11
|
StreamingClientErrorTypes["invalid_token"] = "invalid_token";
|
|
12
12
|
StreamingClientErrorTypes["userCancelled"] = "user_cancelled";
|
|
13
|
-
})(StreamingClientErrorTypes
|
|
13
|
+
})(StreamingClientErrorTypes || (exports.StreamingClientErrorTypes = StreamingClientErrorTypes = {}));
|
|
14
14
|
var SessionTypes;
|
|
15
15
|
(function (SessionTypes) {
|
|
16
16
|
SessionTypes["softphone"] = "softphone";
|
|
@@ -19,4 +19,4 @@ var SessionTypes;
|
|
|
19
19
|
SessionTypes["screenRecording"] = "screenRecording";
|
|
20
20
|
SessionTypes["liveScreenMonitoring"] = "liveScreenMonitoring";
|
|
21
21
|
SessionTypes["unknown"] = "unknown";
|
|
22
|
-
})(SessionTypes
|
|
22
|
+
})(SessionTypes || (exports.SessionTypes = SessionTypes = {}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import EventEmitter from 'events';
|
|
3
2
|
import Logger from 'genesys-cloud-client-logger';
|
|
4
3
|
import { JingleReasonCondition } from 'stanza/Constants';
|
|
@@ -7,8 +6,8 @@ import StrictEventEmitter from 'stanza/lib/StrictEventEmitter';
|
|
|
7
6
|
import { JingleInfo, JingleReason } from 'stanza/protocol';
|
|
8
7
|
import { StatsEvent } from 'webrtc-stats-gatherer';
|
|
9
8
|
import { JsonRpcMessage, SessionTypes, SessionTypesAsStrings } from './interfaces';
|
|
10
|
-
export
|
|
11
|
-
export
|
|
9
|
+
export type SessionState = 'pending' | 'active' | 'ended';
|
|
10
|
+
export type ConnectionState = 'starting' | 'new' | 'connecting' | 'connected' | 'interrupted' | 'disconnected' | 'failed' | 'closed';
|
|
12
11
|
export interface SessionEvents {
|
|
13
12
|
iceConnectionType: ({
|
|
14
13
|
localCandidateType: string;
|
package/dist/cjs/utils.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const isScreenRecordingJid: (jid: string) => boolean;
|
|
|
19
19
|
export declare const isLiveScreenMonitoringJid: (jid: string) => boolean;
|
|
20
20
|
export declare const isSoftphoneJid: (jid: string) => boolean;
|
|
21
21
|
export declare const isVideoJid: (jid: string) => boolean;
|
|
22
|
-
export
|
|
22
|
+
export type RetryPromise<T = any> = {
|
|
23
23
|
promise: Promise<T>;
|
|
24
24
|
cancel: (reason?: string | Error) => void;
|
|
25
25
|
complete: (value?: T) => void;
|
package/dist/cjs/utils.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.parseJwt = exports.isVideoJid = exports.isSoftphoneJid = exports.isLiveScreenMonitoringJid = exports.isScreenRecordingJid = exports.isAcdJid = exports.StreamingSubscriptionError = exports.StreamingClientError = void 0;
|
|
4
|
+
exports.timeoutPromise = timeoutPromise;
|
|
5
|
+
exports.delay = delay;
|
|
6
|
+
exports.splitIntoIndividualTopics = splitIntoIndividualTopics;
|
|
7
|
+
exports.retryPromise = retryPromise;
|
|
8
|
+
exports.calculatePayloadSize = calculatePayloadSize;
|
|
9
|
+
exports.getUfragFromSdp = getUfragFromSdp;
|
|
10
|
+
exports.getIcePwdFromSdp = getIcePwdFromSdp;
|
|
11
|
+
exports.iceIsDifferent = iceIsDifferent;
|
|
4
12
|
const uuid_1 = require("uuid");
|
|
5
13
|
const timeout_error_1 = require("./types/timeout-error");
|
|
6
14
|
const interfaces_1 = require("./types/interfaces");
|
|
@@ -47,13 +55,11 @@ function timeoutPromise(fn, timeoutMs, msg, details) {
|
|
|
47
55
|
fn(done, reject);
|
|
48
56
|
});
|
|
49
57
|
}
|
|
50
|
-
exports.timeoutPromise = timeoutPromise;
|
|
51
58
|
function delay(ms) {
|
|
52
59
|
return new Promise((resolve) => {
|
|
53
60
|
setTimeout(resolve, ms);
|
|
54
61
|
});
|
|
55
62
|
}
|
|
56
|
-
exports.delay = delay;
|
|
57
63
|
function splitIntoIndividualTopics(topicString) {
|
|
58
64
|
const topics = [];
|
|
59
65
|
if (topicString.includes('?')) {
|
|
@@ -71,7 +77,6 @@ function splitIntoIndividualTopics(topicString) {
|
|
|
71
77
|
}
|
|
72
78
|
return topics;
|
|
73
79
|
}
|
|
74
|
-
exports.splitIntoIndividualTopics = splitIntoIndividualTopics;
|
|
75
80
|
const isAcdJid = function (jid) {
|
|
76
81
|
return jid.startsWith('acd-') && !(0, exports.isSoftphoneJid)(jid);
|
|
77
82
|
};
|
|
@@ -144,7 +149,6 @@ retryFn, retryInterval = 15000, logger = console) {
|
|
|
144
149
|
hasCompleted: () => _hasCompleted
|
|
145
150
|
};
|
|
146
151
|
}
|
|
147
|
-
exports.retryPromise = retryPromise;
|
|
148
152
|
// from https://stackoverflow.com/questions/38552003/how-to-decode-jwt-token-in-javascript
|
|
149
153
|
const parseJwt = (token) => {
|
|
150
154
|
const base64Url = token.split('.')[1];
|
|
@@ -162,7 +166,6 @@ function calculatePayloadSize(trace) {
|
|
|
162
166
|
const m = encodeURIComponent(str).match(/%[89ABab]/g);
|
|
163
167
|
return str.length + (m ? m.length : 0);
|
|
164
168
|
}
|
|
165
|
-
exports.calculatePayloadSize = calculatePayloadSize;
|
|
166
169
|
function getUfragFromSdp(sdp) {
|
|
167
170
|
if (!sdp) {
|
|
168
171
|
return null;
|
|
@@ -171,7 +174,6 @@ function getUfragFromSdp(sdp) {
|
|
|
171
174
|
const match = sdp.match(regex);
|
|
172
175
|
return match ? match[1] : null;
|
|
173
176
|
}
|
|
174
|
-
exports.getUfragFromSdp = getUfragFromSdp;
|
|
175
177
|
function getIcePwdFromSdp(sdp) {
|
|
176
178
|
if (!sdp) {
|
|
177
179
|
return null;
|
|
@@ -180,11 +182,9 @@ function getIcePwdFromSdp(sdp) {
|
|
|
180
182
|
const match = sdp.match(regex);
|
|
181
183
|
return match ? match[1] : null;
|
|
182
184
|
}
|
|
183
|
-
exports.getIcePwdFromSdp = getIcePwdFromSdp;
|
|
184
185
|
function iceIsDifferent(sdp1, sdp2) {
|
|
185
186
|
return getUfragFromSdp(sdp1) !== getUfragFromSdp(sdp2) || getIcePwdFromSdp(sdp1) !== getIcePwdFromSdp(sdp2);
|
|
186
187
|
}
|
|
187
|
-
exports.iceIsDifferent = iceIsDifferent;
|
|
188
188
|
// unsed, but handy. no test coverage until used
|
|
189
189
|
// function mergeOptions (destination, provided) {
|
|
190
190
|
// for (var key in provided) {
|
package/dist/cjs/webrtc.d.ts
CHANGED
package/dist/cjs/webrtc.js
CHANGED
|
@@ -18,17 +18,17 @@ const stanza_media_session_1 = require("./types/stanza-media-session");
|
|
|
18
18
|
const genesys_cloud_media_session_1 = require("./types/genesys-cloud-media-session");
|
|
19
19
|
const http_client_1 = require("./http-client");
|
|
20
20
|
const events = {
|
|
21
|
-
REQUEST_WEBRTC_DUMP: 'requestWebrtcDump',
|
|
21
|
+
REQUEST_WEBRTC_DUMP: 'requestWebrtcDump', // dump triggered by someone in room
|
|
22
22
|
/* jingle messaging */
|
|
23
|
-
REQUEST_INCOMING_RTCSESSION: 'requestIncomingRtcSession',
|
|
24
|
-
CANCEL_INCOMING_RTCSESSION: 'cancelIncomingRtcSession',
|
|
25
|
-
HANDLED_INCOMING_RTCSESSION: 'handledIncomingRtcSession',
|
|
26
|
-
OUTGOING_RTCSESSION_PROCEED: 'outgoingRtcSessionProceed',
|
|
27
|
-
OUTGOING_RTCSESSION_REJECTED: 'outgoingRtcSessionRejected',
|
|
23
|
+
REQUEST_INCOMING_RTCSESSION: 'requestIncomingRtcSession', // incoming call
|
|
24
|
+
CANCEL_INCOMING_RTCSESSION: 'cancelIncomingRtcSession', // retracted (caller hungup before you answered)
|
|
25
|
+
HANDLED_INCOMING_RTCSESSION: 'handledIncomingRtcSession', // you answered on another client
|
|
26
|
+
OUTGOING_RTCSESSION_PROCEED: 'outgoingRtcSessionProceed', // target answered, wants to continue
|
|
27
|
+
OUTGOING_RTCSESSION_REJECTED: 'outgoingRtcSessionRejected', // target rejected the call
|
|
28
28
|
// /* jingle */
|
|
29
29
|
// RTC_ICESERVERS: 'rtcIceServers', // ice servers have been discovered
|
|
30
|
-
INCOMING_RTCSESSION: 'incomingRtcSession',
|
|
31
|
-
OUTGOING_RTCSESSION: 'outgoingRtcSession',
|
|
30
|
+
INCOMING_RTCSESSION: 'incomingRtcSession', // jingle session created for incoming call
|
|
31
|
+
OUTGOING_RTCSESSION: 'outgoingRtcSession', // jingle session created for outgoing call
|
|
32
32
|
RTCSESSION_ERROR: 'rtcSessionError' // jingle error occurred
|
|
33
33
|
// TRACE_RTCSESSION: 'traceRtcSession', // trace messages for logging, etc
|
|
34
34
|
// UPGRADE_MEDIA_ERROR: 'upgradeMediaError', // error occurred joining conference
|
|
@@ -41,6 +41,10 @@ const MAX_DISCO_RETRIES = 2;
|
|
|
41
41
|
const ICE_SERVER_TIMEOUT = 15000; // 15 seconds
|
|
42
42
|
const ICE_SERVER_REFRESH_PERIOD = 1000 * 60 * 60 * 6; // 6 hours
|
|
43
43
|
class WebrtcExtension extends events_1.EventEmitter {
|
|
44
|
+
get jid() {
|
|
45
|
+
var _a;
|
|
46
|
+
return (_a = this.stanzaInstance) === null || _a === void 0 ? void 0 : _a.jid;
|
|
47
|
+
}
|
|
44
48
|
constructor(client, clientOptions) {
|
|
45
49
|
super();
|
|
46
50
|
// sessionId maps to boolean where `true` means the sessionId is ignored
|
|
@@ -91,10 +95,6 @@ class WebrtcExtension extends events_1.EventEmitter {
|
|
|
91
95
|
window.addEventListener('offline', () => this.onOnlineStatusChange(false));
|
|
92
96
|
window.addEventListener('online', () => this.onOnlineStatusChange(true));
|
|
93
97
|
}
|
|
94
|
-
get jid() {
|
|
95
|
-
var _a;
|
|
96
|
-
return (_a = this.stanzaInstance) === null || _a === void 0 ? void 0 : _a.jid;
|
|
97
|
-
}
|
|
98
98
|
onOnlineStatusChange(online) {
|
|
99
99
|
this.addStatToQueue({
|
|
100
100
|
actionName: 'WebrtcStats',
|
package/dist/deploy-info.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
3
|
-
"build": "
|
|
4
|
-
"buildDate": "2026-
|
|
2
|
+
"version": "uuid-fix",
|
|
3
|
+
"build": "3",
|
|
4
|
+
"buildDate": "2026-05-13T15:16:48.192Z",
|
|
5
5
|
"indexFiles": [
|
|
6
6
|
{
|
|
7
|
-
"file": "v19.
|
|
7
|
+
"file": "v19.7.0/streaming-client.browser.js"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
"file": "v19.
|
|
10
|
+
"file": "v19.7.0/streaming-client.browser.js.LICENSE.txt"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"file": "v19/streaming-client.browser.js"
|
package/dist/es/client.d.ts
CHANGED
package/dist/es/client.js
CHANGED
|
@@ -57,10 +57,11 @@ export class Client extends EventEmitter {
|
|
|
57
57
|
jwt: options.jwt,
|
|
58
58
|
jid: options.jid,
|
|
59
59
|
jidResource: options.jidResource,
|
|
60
|
-
channelId: null,
|
|
60
|
+
channelId: null, // created on connect
|
|
61
61
|
appName: options.appName,
|
|
62
62
|
appVersion: options.appVersion,
|
|
63
63
|
appId: options.appId,
|
|
64
|
+
logLevel: options.logLevel,
|
|
64
65
|
customHeaders: options.customHeaders
|
|
65
66
|
};
|
|
66
67
|
this.backgroundAssistantMode = this.checkIsBackgroundAssistant();
|
|
@@ -182,8 +183,8 @@ export class Client extends EventEmitter {
|
|
|
182
183
|
};
|
|
183
184
|
}
|
|
184
185
|
handleStanzaDisconnectedEvent(disconnectedInstance) {
|
|
185
|
-
var _a, _b;
|
|
186
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
var _a, _b;
|
|
187
188
|
this.logger.info('stanzaDisconnected event received', { stanzaInstanceId: disconnectedInstance.id, channelId: disconnectedInstance.channelId });
|
|
188
189
|
this.connected = false;
|
|
189
190
|
this.connecting = false;
|
|
@@ -315,8 +316,8 @@ export class Client extends EventEmitter {
|
|
|
315
316
|
return Math.min(minDelay, maxDelay);
|
|
316
317
|
}
|
|
317
318
|
connect(connectOpts) {
|
|
318
|
-
var _a;
|
|
319
319
|
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
var _a;
|
|
320
321
|
this.cancelConnectionAttempt = false;
|
|
321
322
|
if (this.connecting) {
|
|
322
323
|
const error = new Error('Already trying to connect streaming client');
|
|
@@ -404,8 +405,8 @@ export class Client extends EventEmitter {
|
|
|
404
405
|
});
|
|
405
406
|
}
|
|
406
407
|
backoffConnectRetryHandler(connectOpts, err, connectionAttempt) {
|
|
407
|
-
var _a, _b, _c, _d;
|
|
408
408
|
return __awaiter(this, void 0, void 0, function* () {
|
|
409
|
+
var _a, _b, _c, _d;
|
|
409
410
|
// Check `cancelConnectionAttempt` instead of the error type in case a different error occurred
|
|
410
411
|
// around the same time that might allow for retries to continue.
|
|
411
412
|
if (this.cancelConnectionAttempt) {
|
|
@@ -531,8 +532,8 @@ export class Client extends EventEmitter {
|
|
|
531
532
|
});
|
|
532
533
|
}
|
|
533
534
|
makeConnectionAttempt() {
|
|
534
|
-
var _a, _b;
|
|
535
535
|
return __awaiter(this, void 0, void 0, function* () {
|
|
536
|
+
var _a, _b;
|
|
536
537
|
if (this.cancelConnectionAttempt) {
|
|
537
538
|
throw new UserCancelledError('Connection attempt cancelled');
|
|
538
539
|
}
|
|
@@ -684,6 +685,6 @@ export class Client extends EventEmitter {
|
|
|
684
685
|
return Client.version;
|
|
685
686
|
}
|
|
686
687
|
static get version() {
|
|
687
|
-
return '19.
|
|
688
|
+
return '19.7.0';
|
|
688
689
|
}
|
|
689
690
|
}
|
package/dist/es/http-client.js
CHANGED
|
@@ -147,7 +147,7 @@ export class HttpClient {
|
|
|
147
147
|
// responseBody: res.text,
|
|
148
148
|
// requestBody: res.req._data,
|
|
149
149
|
// url: res.error.url,
|
|
150
|
-
message: 'Error making HTTP request',
|
|
150
|
+
message: 'Error making HTTP request', // res.error.message,
|
|
151
151
|
method: res.req.method,
|
|
152
152
|
name: res.error.name,
|
|
153
153
|
stack: res.error.stack
|