@webex/plugin-meetings 3.0.0-beta.1 → 3.0.0-beta.2

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.
Files changed (111) hide show
  1. package/dist/common/errors/webex-errors.js +5 -29
  2. package/dist/common/errors/webex-errors.js.map +1 -1
  3. package/dist/constants.js +15 -74
  4. package/dist/constants.js.map +1 -1
  5. package/dist/media/index.js +68 -213
  6. package/dist/media/index.js.map +1 -1
  7. package/dist/media/internal-media-core-wrapper.js +22 -0
  8. package/dist/media/internal-media-core-wrapper.js.map +1 -0
  9. package/dist/media/properties.js +20 -25
  10. package/dist/media/properties.js.map +1 -1
  11. package/dist/media/util.js +0 -27
  12. package/dist/media/util.js.map +1 -1
  13. package/dist/meeting/index.js +694 -432
  14. package/dist/meeting/index.js.map +1 -1
  15. package/dist/meeting/request.js +1 -0
  16. package/dist/meeting/request.js.map +1 -1
  17. package/dist/meeting/util.js +3 -44
  18. package/dist/meeting/util.js.map +1 -1
  19. package/dist/meetings/index.js +64 -5
  20. package/dist/meetings/index.js.map +1 -1
  21. package/dist/meetings/util.js +24 -1
  22. package/dist/meetings/util.js.map +1 -1
  23. package/dist/members/index.js +68 -0
  24. package/dist/members/index.js.map +1 -1
  25. package/dist/multistream/mediaRequestManager.js +132 -0
  26. package/dist/multistream/mediaRequestManager.js.map +1 -0
  27. package/dist/multistream/multistreamMedia.js +116 -0
  28. package/dist/multistream/multistreamMedia.js.map +1 -0
  29. package/dist/multistream/receiveSlot.js +209 -0
  30. package/dist/multistream/receiveSlot.js.map +1 -0
  31. package/dist/multistream/receiveSlotManager.js +195 -0
  32. package/dist/multistream/receiveSlotManager.js.map +1 -0
  33. package/dist/multistream/remoteMedia.js +284 -0
  34. package/dist/multistream/remoteMedia.js.map +1 -0
  35. package/dist/multistream/remoteMediaGroup.js +243 -0
  36. package/dist/multistream/remoteMediaGroup.js.map +1 -0
  37. package/dist/multistream/remoteMediaManager.js +1113 -0
  38. package/dist/multistream/remoteMediaManager.js.map +1 -0
  39. package/dist/reconnection-manager/index.js +109 -130
  40. package/dist/reconnection-manager/index.js.map +1 -1
  41. package/dist/roap/index.js +57 -240
  42. package/dist/roap/index.js.map +1 -1
  43. package/dist/roap/request.js +2 -114
  44. package/dist/roap/request.js.map +1 -1
  45. package/dist/roap/turnDiscovery.js +11 -5
  46. package/dist/roap/turnDiscovery.js.map +1 -1
  47. package/dist/statsAnalyzer/global.js +2 -0
  48. package/dist/statsAnalyzer/global.js.map +1 -1
  49. package/dist/statsAnalyzer/index.js +39 -36
  50. package/dist/statsAnalyzer/index.js.map +1 -1
  51. package/package.json +20 -19
  52. package/src/common/errors/webex-errors.js +0 -18
  53. package/src/constants.ts +139 -180
  54. package/src/media/index.js +60 -194
  55. package/src/media/internal-media-core-wrapper.ts +9 -0
  56. package/src/media/properties.js +19 -25
  57. package/src/media/util.js +0 -22
  58. package/src/meeting/index.js +565 -320
  59. package/src/meeting/request.js +1 -0
  60. package/src/meeting/util.js +3 -46
  61. package/src/meetings/index.js +30 -1
  62. package/src/meetings/util.js +23 -2
  63. package/src/members/index.js +48 -0
  64. package/src/multistream/mediaRequestManager.ts +164 -0
  65. package/src/multistream/multistreamMedia.ts +92 -0
  66. package/src/multistream/receiveSlot.ts +141 -0
  67. package/src/multistream/receiveSlotManager.ts +142 -0
  68. package/src/multistream/remoteMedia.ts +219 -0
  69. package/src/multistream/remoteMediaGroup.ts +224 -0
  70. package/src/multistream/remoteMediaManager.ts +911 -0
  71. package/src/reconnection-manager/index.js +40 -53
  72. package/src/roap/index.js +47 -207
  73. package/src/roap/request.js +1 -72
  74. package/src/roap/turnDiscovery.ts +12 -6
  75. package/src/statsAnalyzer/global.js +2 -0
  76. package/src/statsAnalyzer/index.js +32 -46
  77. package/test/integration/spec/journey.js +1 -1
  78. package/test/unit/spec/media/index.ts +223 -0
  79. package/test/unit/spec/media/properties.ts +73 -82
  80. package/test/unit/spec/meeting/effectsState.js +1 -3
  81. package/test/unit/spec/meeting/index.js +420 -228
  82. package/test/unit/spec/meeting/muteState.js +7 -0
  83. package/test/unit/spec/meeting/utils.js +61 -2
  84. package/test/unit/spec/meetings/index.js +0 -4
  85. package/test/unit/spec/members/index.js +164 -2
  86. package/test/unit/spec/multistream/mediaRequestManager.ts +511 -0
  87. package/test/unit/spec/multistream/receiveSlot.ts +104 -0
  88. package/test/unit/spec/multistream/receiveSlotManager.ts +173 -0
  89. package/test/unit/spec/multistream/remoteMedia.ts +217 -0
  90. package/test/unit/spec/multistream/remoteMediaGroup.ts +396 -0
  91. package/test/unit/spec/multistream/remoteMediaManager.ts +1251 -0
  92. package/test/unit/spec/roap/index.ts +63 -35
  93. package/test/unit/spec/stats-analyzer/index.js +19 -22
  94. package/dist/peer-connection-manager/index.js +0 -794
  95. package/dist/peer-connection-manager/index.js.map +0 -1
  96. package/dist/roap/collection.js +0 -73
  97. package/dist/roap/collection.js.map +0 -1
  98. package/dist/roap/handler.js +0 -337
  99. package/dist/roap/handler.js.map +0 -1
  100. package/dist/roap/state.js +0 -164
  101. package/dist/roap/state.js.map +0 -1
  102. package/dist/roap/util.js +0 -102
  103. package/dist/roap/util.js.map +0 -1
  104. package/src/peer-connection-manager/index.js +0 -723
  105. package/src/roap/collection.js +0 -63
  106. package/src/roap/handler.js +0 -252
  107. package/src/roap/state.js +0 -149
  108. package/src/roap/util.js +0 -93
  109. package/test/unit/spec/peerconnection-manager/index.js +0 -188
  110. package/test/unit/spec/peerconnection-manager/utils.js +0 -48
  111. package/test/unit/spec/roap/util.js +0 -30
package/src/constants.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { hydraTypes } from '@webex/common';
1
+ import {hydraTypes} from '@webex/common';
2
2
 
3
3
  // *********** LOWERCASE / CAMELCASE STRINGS ************
4
4
 
@@ -26,8 +26,6 @@ export const DECLINE = 'decline';
26
26
  export const ERROR = 'error';
27
27
  export const ENDED = 'ended';
28
28
 
29
- export const OFFER = 'offer';
30
-
31
29
  export const HECATE = 'hecate';
32
30
 
33
31
  export const HOST = 'host';
@@ -104,7 +102,6 @@ export const _MEETING_ID_ = 'MEETING_ID';
104
102
  export const _NOT_IN_MEETING_ = 'NOT_IN_MEETING';
105
103
  export const _NONE_ = 'NONE';
106
104
 
107
- export const _OFFER_ = 'OFFER';
108
105
  export const _OBSERVE_ = 'OBSERVE';
109
106
 
110
107
  export const _PERSONAL_ROOM_ = 'PERSONAL_ROOM';
@@ -135,14 +132,14 @@ export const _MOVE_MEDIA_ = 'MOVE_MEDIA';
135
132
  export const PARTICIPANT_DELTAS = {
136
133
  TARGETS: {
137
134
  AUDIO: 'audio',
138
- VIDEO: 'video'
135
+ VIDEO: 'video',
139
136
  },
140
137
  STATES: {
141
138
  DISABLED: 'disabled',
142
139
  MUTED: 'muted',
143
140
  UNKNOWN: 'unknown',
144
- UNMUTED: 'unmuted'
145
- }
141
+ UNMUTED: 'unmuted',
142
+ },
146
143
  };
147
144
 
148
145
  // *********** STRING HELPERS ***********
@@ -190,7 +187,6 @@ export const ICE_TIMEOUT = 2000;
190
187
  export const ICE_FAIL_TIMEOUT = 3000;
191
188
 
192
189
  export const RETRY_TIMEOUT = 3000;
193
- export const ROAP_SEQ_PRE = -1;
194
190
 
195
191
  export const PC_BAIL_TIMEOUT = 8000;
196
192
 
@@ -200,21 +196,26 @@ export const DIALER_REGEX = {
200
196
  // modified from https://github.com/kirm/sip.js base
201
197
  // and with https://tools.ietf.org/html/rfc3261
202
198
  // requires the @ symbol
203
- SIP_ADDRESS: /^(sips?)?:?(?:([^\s>:@]+)(?::([^\s@>]+))?@)([\w\-.]+)(?::(\d+))?((?:;[^\s=?>;]+(?:=[^\s?;]+)?)*)(?:\?(([^\s&=>]+=[^\s&=>]+)(&[^\s&=>]+=[^\s&=>]+)*))?$/,
199
+ SIP_ADDRESS:
200
+ /^(sips?)?:?(?:([^\s>:@]+)(?::([^\s@>]+))?@)([\w\-.]+)(?::(\d+))?((?:;[^\s=?>;]+(?:=[^\s?;]+)?)*)(?:\?(([^\s&=>]+=[^\s&=>]+)(&[^\s&=>]+=[^\s&=>]+)*))?$/,
204
201
  // standard telephony num regex
205
- PHONE_NUMBER: /^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/,
206
- E164_FORMAT: /^\+[1-9]\d{1,14}$/
202
+ PHONE_NUMBER:
203
+ /^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/,
204
+ E164_FORMAT: /^\+[1-9]\d{1,14}$/,
207
205
  };
208
206
 
209
207
  // eslint-disable-next-line max-len
210
208
  export const IPV4_REGEX = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}|.local/g;
211
209
 
212
- export const VALID_EMAIL_ADDRESS = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
213
- export const VALID_PMR_ADDRESS = /([a-z0-9][-a-z0-9, '.']{0,62})@([a-z0-9][-a-z0-9, '.']{0,62})\.webex\.com/i;
214
- export const VALID_PMR_LINK = /(https:\/\/)?([a-z0-9][-a-z0-9, '.']{0,62})\.webex\.com\/(meet|join)\/([a-z0-9][-a-z0-9, '.']{0,62})\/?/i;
210
+ export const VALID_EMAIL_ADDRESS =
211
+ /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
212
+ export const VALID_PMR_ADDRESS =
213
+ /([a-z0-9][-a-z0-9, '.']{0,62})@([a-z0-9][-a-z0-9, '.']{0,62})\.webex\.com/i;
214
+ export const VALID_PMR_LINK =
215
+ /(https:\/\/)?([a-z0-9][-a-z0-9, '.']{0,62})\.webex\.com\/(meet|join)\/([a-z0-9][-a-z0-9, '.']{0,62})\/?/i;
215
216
  export const VALID_PIN = /([0-9]{4,6})/;
216
- export const UUID_REG = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
217
-
217
+ export const UUID_REG =
218
+ /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
218
219
 
219
220
  // ******************** OBJECTS ********************
220
221
  // Please alphabetize, and keep objects organized
@@ -222,7 +223,7 @@ export const UUID_REG = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f
222
223
  // TODO: move all api params to API section
223
224
  export const API = {
224
225
  CALLIOPEDISCOVERY: 'calliopeDiscovery',
225
- LOCUS: 'locus'
226
+ LOCUS: 'locus',
226
227
  };
227
228
 
228
229
  export const CALENDAR_EVENTS = {
@@ -230,26 +231,38 @@ export const CALENDAR_EVENTS = {
230
231
  UPDATE: 'event:calendar.meeting.update',
231
232
  CREATE_MINIMAL: 'event:calendar.meeting.create.minimal',
232
233
  UPDATE_MINIMAL: 'event:calendar.meeting.update.minimal',
233
- DELETE: 'event:calendar.meeting.delete'
234
+ DELETE: 'event:calendar.meeting.delete',
234
235
  };
235
236
 
236
237
  export const DEFAULT_GET_STATS_FILTER = {
237
- types: ['track', 'transport', 'candidate-pair', 'outbound-rtp', 'outboundrtp', 'inbound-rtp', 'inboundrtp', 'remote-inbound-rtp', 'remote-outbound-rtp', 'remote-candidate', 'local-candidate', 'media-source']
238
+ types: [
239
+ 'track',
240
+ 'transport',
241
+ 'candidate-pair',
242
+ 'outbound-rtp',
243
+ 'outboundrtp',
244
+ 'inbound-rtp',
245
+ 'inboundrtp',
246
+ 'remote-inbound-rtp',
247
+ 'remote-outbound-rtp',
248
+ 'remote-candidate',
249
+ 'local-candidate',
250
+ 'media-source',
251
+ ],
238
252
  };
239
253
 
240
-
241
254
  export const RECORDING_STATE = {
242
255
  RECORDING: 'recording',
243
256
  IDLE: 'idle',
244
257
  PAUSED: 'paused',
245
- RESUMED: 'resumed'
258
+ RESUMED: 'resumed',
246
259
  };
247
260
 
248
261
  export const SHARE_STATUS = {
249
262
  NO_SHARE: 'no_share',
250
263
  REMOTE_SHARE_ACTIVE: 'remote_share_active',
251
264
  LOCAL_SHARE_ACTIVE: 'local_share_active',
252
- WHITEBOARD_SHARE_ACTIVE: 'whiteboard_share_active'
265
+ WHITEBOARD_SHARE_ACTIVE: 'whiteboard_share_active',
253
266
  };
254
267
 
255
268
  // TODO: do we want to scope by meeting, members when they come off those objects themselves?
@@ -311,7 +324,14 @@ export const EVENT_TRIGGERS = {
311
324
  MEETINGS_NETWORK_CONNECTED: 'network:connected',
312
325
  MEETING_SELF_LEFT: 'meeting:self:left',
313
326
  NETWORK_QUALITY: 'network:quality',
314
- MEDIA_NEGOTIATED: 'media:negotiated'
327
+ MEDIA_NEGOTIATED: 'media:negotiated',
328
+ // the following events apply only to multistream media connections
329
+ ACTIVE_SPEAKER_CHANGED: 'media:activeSpeakerChanged',
330
+ REMOTE_VIDEO_SOURCE_COUNT_CHANGED: 'media:remoteVideoSourceCountChanged',
331
+ REMOTE_AUDIO_SOURCE_COUNT_CHANGED: 'media:remoteAudioSourceCountChanged',
332
+ REMOTE_MEDIA_AUDIO_CREATED: 'media:remoteAudio:created',
333
+ REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED: 'media:remoteScrenShareAudio:created',
334
+ REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED: 'media:remoteVideo:layoutChanged',
315
335
  };
316
336
 
317
337
  export const EVENT_TYPES = {
@@ -323,7 +343,7 @@ export const EVENT_TYPES = {
323
343
  REMOTE_VIDEO: 'remoteVideo',
324
344
  REMOTE_SHARE: 'remoteShare',
325
345
  LOCAL_SHARE: 'localShare',
326
- ERROR: 'error'
346
+ ERROR: 'error',
327
347
  };
328
348
 
329
349
  // Handles the reason when meeting gets destroyed
@@ -337,7 +357,7 @@ export const MEETING_REMOVED_REASON = {
337
357
  CLIENT_LEAVE_REQUEST: 'CLIENT_LEAVE_REQUEST', // You triggered leave meeting
338
358
  USER_ENDED_SHARE_STREAMS: 'USER_ENDED_SHARE_STREAMS', // user triggered stop share
339
359
  NO_MEETINGS_TO_SYNC: 'NO_MEETINGS_TO_SYNC', // After the syncMeeting no meeting exists
340
- MEETING_CONNECTION_FAILED: 'MEETING_CONNECTION_FAILED' // meeting failed to connect due to ice failures or firewall issue
360
+ MEETING_CONNECTION_FAILED: 'MEETING_CONNECTION_FAILED', // meeting failed to connect due to ice failures or firewall issue
341
361
  };
342
362
 
343
363
  // One one one calls ends for the following reasons
@@ -346,17 +366,15 @@ export const MEETING_REMOVED_REASON = {
346
366
  export const CALL_REMOVED_REASON = {
347
367
  CALL_INACTIVE: 'CALL_INACTIVE', // partner and you leave the call
348
368
  PARTNER_LEFT: 'PARTNER_LEFT', // partner left the call
349
- SELF_LEFT: 'SELF_LEFT'// you left/declined the call
369
+ SELF_LEFT: 'SELF_LEFT', // you left/declined the call
350
370
  };
351
371
 
352
372
  export const SHARE_STOPPED_REASON = {
353
373
  SELF_STOPPED: 'SELF_STOPPED',
354
- MEETING_REJOIN: 'MEETING_REJOIN'
374
+ MEETING_REJOIN: 'MEETING_REJOIN',
355
375
  };
356
376
 
357
377
  export const EVENTS = {
358
- ROAP_OK: 'ROAP_OK',
359
- ROAP_ANSWER: 'ROAP_ANSWER',
360
378
  SELF_UNADMITTED_GUEST: 'SELF_UNADMITTED_GUEST',
361
379
  SELF_ADMITTED_GUEST: 'SELF_ADMITTED_GUEST',
362
380
  MEDIA_INACTIVITY: 'MEDIA_INACTIVITY',
@@ -371,66 +389,70 @@ export const EVENTS = {
371
389
  LOCUS_INFO_UPDATE_SELF: 'LOCUS_INFO_UPDATE_SELF',
372
390
  LOCUS_INFO_UPDATE_URL: 'LOCUS_INFO_UPDATE_URL',
373
391
  LOCUS_INFO_CAN_ASSIGN_HOST: 'LOCUS_INFO_CAN_ASSIGN_HOST',
374
- DISCONNECT_DUE_TO_INACTIVITY: 'DISCONNECT_DUE_TO_INACTIVITY'
392
+ DISCONNECT_DUE_TO_INACTIVITY: 'DISCONNECT_DUE_TO_INACTIVITY',
375
393
  };
376
394
 
377
395
  export const MEDIA_STATE = {
378
396
  active: 'active',
379
- inactive: 'inactive'
397
+ inactive: 'inactive',
380
398
  };
381
399
 
382
400
  export const ERROR_DICTIONARY = {
383
401
  PARAMETER: {
384
402
  NAME: 'ParameterError',
385
- MESSAGE: 'The parameters passed to the function, or object properties needed in the function were null, missing where required, or otherwise incorrect.',
386
- CODE: 0
403
+ MESSAGE:
404
+ 'The parameters passed to the function, or object properties needed in the function were null, missing where required, or otherwise incorrect.',
405
+ CODE: 0,
387
406
  },
388
407
  INTENT_TO_JOIN: {
389
408
  NAME: 'IntentToJoinError',
390
- MESSAGE: 'The meeting is locked. This is expected behavior. Call #join again with pin and/or moderator option',
391
- CODE: 1
409
+ MESSAGE:
410
+ 'The meeting is locked. This is expected behavior. Call #join again with pin and/or moderator option',
411
+ CODE: 1,
392
412
  },
393
413
  JOIN_MEETING: {
394
414
  NAME: 'JoinMeetingError',
395
415
  MESSAGE: 'There was an issue joining the meeting, meeting could be in a bad state.',
396
- CODE: 2
416
+ CODE: 2,
397
417
  },
398
418
  RECONNECTION: {
399
419
  NAME: 'ReconnectionError',
400
- MESSAGE: 'There was an error in the reconnection flow, the meeting may not reconnect, disconnect and dial again.',
401
- CODE: 3
420
+ MESSAGE:
421
+ 'There was an error in the reconnection flow, the meeting may not reconnect, disconnect and dial again.',
422
+ CODE: 3,
402
423
  },
403
424
  MEDIA: {
404
425
  NAME: 'MediaError',
405
426
  MESSAGE: 'There was an error with media, the meeting may not have live audio, video or share.',
406
- CODE: 4
427
+ CODE: 4,
407
428
  },
408
429
  PERMISSION: {
409
430
  NAME: 'PermissionError',
410
- MESSAGE: 'Not allowed to execute the function, some properties on server, or local client state do not allow you to complete this action.',
411
- CODE: 5
431
+ MESSAGE:
432
+ 'Not allowed to execute the function, some properties on server, or local client state do not allow you to complete this action.',
433
+ CODE: 5,
412
434
  },
413
435
  STATS: {
414
436
  NAME: 'StatsError',
415
437
  MESSAGE: 'An error occurred with getStats, stats may not continue for this data stream.',
416
- CODE: 6
438
+ CODE: 6,
417
439
  },
418
440
  PASSWORD: {
419
441
  NAME: 'PasswordError',
420
442
  MESSAGE: 'Password is required, please use verifyPassword()',
421
- CODE: 7
443
+ CODE: 7,
422
444
  },
423
445
  CAPTCHA: {
424
446
  NAME: 'CaptchaError',
425
447
  MESSAGE: 'Captcha is required.',
426
- CODE: 8
427
- }
448
+ CODE: 8,
449
+ },
428
450
  };
429
451
 
430
452
  export const FLOOR_ACTION = {
431
453
  GRANTED: 'GRANTED',
432
454
  RELEASED: 'RELEASED',
433
- ACCEPTED: 'ACCEPTED'
455
+ ACCEPTED: 'ACCEPTED',
434
456
  };
435
457
 
436
458
  export const FULL_STATE = {
@@ -438,21 +460,21 @@ export const FULL_STATE = {
438
460
  INACTIVE: 'INACTIVE',
439
461
  ACTIVE: 'ACTIVE',
440
462
  TERMINATING: 'TERMINATING',
441
- UNKNOWN: 'UNKNOWN'
463
+ UNKNOWN: 'UNKNOWN',
442
464
  };
443
465
 
444
466
  export const HTTP_VERBS = {
445
467
  PUT: 'PUT',
446
468
  POST: 'POST',
447
469
  GET: 'GET',
448
- PATCH: 'PATCH'
470
+ PATCH: 'PATCH',
449
471
  };
450
472
 
451
473
  // https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/iceGatheringState
452
474
  export const ICE_GATHERING_STATE = {
453
475
  NEW: 'new',
454
476
  GATHERING: 'gathering',
455
- COMPLETE: 'complete'
477
+ COMPLETE: 'complete',
456
478
  };
457
479
 
458
480
  // https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/iceConnectionState
@@ -462,7 +484,7 @@ export const ICE_STATE = {
462
484
  CLOSED: 'closed',
463
485
  COMPLETED: 'completed',
464
486
  FAILED: 'failed',
465
- DISCONNECTED: 'disconnected'
487
+ DISCONNECTED: 'disconnected',
466
488
  };
467
489
 
468
490
  export const CONNECTION_STATE = {
@@ -471,14 +493,14 @@ export const CONNECTION_STATE = {
471
493
  CONNECTED: 'connected',
472
494
  CLOSED: 'closed',
473
495
  FAILED: 'failed',
474
- DISCONNECTED: 'disconnected'
496
+ DISCONNECTED: 'disconnected',
475
497
  };
476
498
 
477
499
  export const LOCUS = {
478
500
  STATE: {
479
501
  INACTIVE: 'INACTIVE',
480
502
  ENDED: 'ENDED',
481
- INITIALIZING: 'INITIALIZING'
503
+ INITIALIZING: 'INITIALIZING',
482
504
  },
483
505
  SEQUENCE: {
484
506
  UN_DEF: 'undef',
@@ -486,9 +508,9 @@ export const LOCUS = {
486
508
  DEF: 'def',
487
509
  NA: 'na',
488
510
  RANGE_START: 'rangeStart',
489
- RANGE_END: 'rangeEnd'
511
+ RANGE_END: 'rangeEnd',
490
512
  },
491
- SYNCDEBUG: 'sync_debug'
513
+ SYNCDEBUG: 'sync_debug',
492
514
  };
493
515
 
494
516
  export const LOCUSINFO = {
@@ -517,7 +539,7 @@ export const LOCUSINFO = {
517
539
  EMBEDDED_APPS_UPDATED: 'EMBEDDED_APPS_UPDATED',
518
540
  SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE: 'SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE',
519
541
  SELF_IS_SHARING_BLOCKED_CHANGE: 'SELF_IS_SHARING_BLOCKED_CHANGE',
520
- }
542
+ },
521
543
  };
522
544
 
523
545
  export const LOCUSEVENT = {
@@ -552,7 +574,7 @@ export const LOCUSEVENT = {
552
574
  RECORDING_START_FAILED: 'locus.recording_start_failed',
553
575
  RECORDING_STOPPED: 'locus.recording_stopped',
554
576
 
555
- SELF_CHANGED: 'locus.self_changed'
577
+ SELF_CHANGED: 'locus.self_changed',
556
578
  };
557
579
 
558
580
  export const MEDIA_TRACK_CONSTRAINT = {
@@ -562,8 +584,8 @@ export const MEDIA_TRACK_CONSTRAINT = {
562
584
  // The cursor should only be visible while moving, then removed.
563
585
  MOTION: 'motion',
564
586
  // The cursor should never be visible in the generated stream.
565
- NEVER: 'never'
566
- }
587
+ NEVER: 'never',
588
+ },
567
589
  };
568
590
 
569
591
  export const MEETING_ERRORS = {
@@ -586,7 +608,8 @@ export const MEETING_ERRORS = {
586
608
  INVALID_LOCUS_ID: 'INVALID_LOCUS_ID',
587
609
  EMPTY_SCHEDULED_MEETING_START_TIME: 'EMPTY_SCHEDULED_MEETING_START_TIME',
588
610
  INVALID_SCHEDULED_MEETING_DURATION_MINUTES: 'INVALID_SCHEDULED_MEETING_DURATION_MINUTES',
589
- INVALID_SCHEDULED_MEETING_REMINDER_DURATION_MINUTES: 'INVALID_SCHEDULED_MEETING_REMINDER_DURATION_MINUTES',
611
+ INVALID_SCHEDULED_MEETING_REMINDER_DURATION_MINUTES:
612
+ 'INVALID_SCHEDULED_MEETING_REMINDER_DURATION_MINUTES',
590
613
  EMPTY_SCHEDULED_MEETING_ORGANIZER: 'EMPTY_SCHEDULED_MEETING_ORGANIZER',
591
614
  INVALID_MEETING_ID_FORMAT: 'INVALID_MEETING_ID_FORMAT',
592
615
  INVALID_SIP_URL_FORMAT: 'INVALID_SIP_URL_FORMAT',
@@ -667,13 +690,12 @@ export const MEETING_ERRORS = {
667
690
  SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
668
691
 
669
692
  SOCKET_TIMEOUT: 'SOCKET_TIMEOUT',
670
- NO_HTTP_RESPONSE: 'NO_HTTP_RESPONSE'
693
+ NO_HTTP_RESPONSE: 'NO_HTTP_RESPONSE',
671
694
  };
672
695
 
673
-
674
696
  export const MEETING_END_REASON = {
675
697
  INACTIVE: 'INACTIVE',
676
- MEDIA_RELEASED: 'MEDIA_RELEASED'
698
+ MEDIA_RELEASED: 'MEDIA_RELEASED',
677
699
  };
678
700
 
679
701
  export const DISPLAY_HINTS = {
@@ -705,7 +727,7 @@ export const DISPLAY_HINTS = {
705
727
 
706
728
  export const SELF_ROLES = {
707
729
  COHOST: 'COHOST',
708
- MODERATOR: 'MODERATOR'
730
+ MODERATOR: 'MODERATOR',
709
731
  };
710
732
 
711
733
  export const MEETING_STATE = {
@@ -720,8 +742,8 @@ export const MEETING_STATE = {
720
742
  TERMINATING: 'TERMINATING',
721
743
  LEFT: 'LEFT',
722
744
  ENDED: 'ENDED',
723
- ERROR: 'ERROR'
724
- }
745
+ ERROR: 'ERROR',
746
+ },
725
747
  };
726
748
 
727
749
  export const MEETING_STATE_MACHINE = {
@@ -733,7 +755,7 @@ export const MEETING_STATE_MACHINE = {
733
755
  DECLINE: 'decline',
734
756
  LEAVE: 'leave',
735
757
  END: 'end',
736
- RESET: 'reset'
758
+ RESET: 'reset',
737
759
  },
738
760
  STATES: {
739
761
  ERROR: 'ERROR',
@@ -742,35 +764,35 @@ export const MEETING_STATE_MACHINE = {
742
764
  DECLINED: 'DECLINED',
743
765
  RINGING: 'RINGING',
744
766
  JOINED: 'JOINED',
745
- ANSWERED: 'ANSWERED'
746
- }
767
+ ANSWERED: 'ANSWERED',
768
+ },
747
769
  };
748
770
 
749
771
  export const MEETING_AUDIO_STATE_MACHINE = {
750
772
  TRANSITIONS: {
751
773
  TOGGLE: 'toggle',
752
- INIT: 'init'
774
+ INIT: 'init',
753
775
  },
754
776
  STATES: {
755
777
  MUTE_SELF: 'SELF_AUDIO_OFF',
756
- UNMUTE_SELF: 'SELF_AUDIO_ON'
757
- }
778
+ UNMUTE_SELF: 'SELF_AUDIO_ON',
779
+ },
758
780
  };
759
781
 
760
782
  export const MEETING_VIDEO_STATE_MACHINE = {
761
783
  TRANSITIONS: {
762
784
  TOGGLE: 'toggle',
763
- INIT: 'init'
785
+ INIT: 'init',
764
786
  },
765
787
  STATES: {
766
788
  MUTE_SELF: 'SELF_VIDEO_OFF',
767
- UNMUTE_SELF: 'SELF_VIDEO_ON'
768
- }
789
+ UNMUTE_SELF: 'SELF_VIDEO_ON',
790
+ },
769
791
  };
770
792
 
771
793
  export const PEER_CONNECTION_STATE = {
772
794
  CLOSED: 'closed',
773
- FAILED: 'failed'
795
+ FAILED: 'failed',
774
796
  };
775
797
 
776
798
  export const RECONNECTION = {
@@ -779,99 +801,49 @@ export const RECONNECTION = {
779
801
  COMPLETE: 'COMPLETE',
780
802
  FAILURE: 'FAILURE',
781
803
  DEFAULT_TRY_COUNT: 0,
782
- DEFAULT_STATUS: ''
783
- }
804
+ DEFAULT_STATUS: '',
805
+ },
784
806
  };
785
807
 
786
808
  export const RESOURCE = {
787
809
  CLUSTERS: 'clusters',
788
810
  REACHABILITY: 'reachability',
789
- LOCI: 'loci'
811
+ LOCI: 'loci',
790
812
  };
791
813
 
792
814
  export const REACHABILITY = {
793
- localStorage: 'reachability.result'
815
+ localStorage: 'reachability.result',
794
816
  };
795
817
 
796
818
  export const ROAP = {
797
- ROAP_TRANSITIONS: {
798
- STEP: 'step'
799
- },
800
819
  ROAP_TYPES: {
801
820
  OFFER: 'OFFER',
802
821
  ANSWER: 'ANSWER',
803
822
  OK: 'OK',
804
823
  ERROR: 'ERROR',
805
- SHUTDOWN: 'SHUTDOWN',
806
- OFFER_REQUEST: 'OFFER_REQUEST',
807
824
  TURN_DISCOVERY_REQUEST: 'TURN_DISCOVERY_REQUEST',
808
825
  TURN_DISCOVERY_RESPONSE: 'TURN_DISCOVERY_RESPONSE',
809
826
  },
810
- ROAP_STATE: {
811
- INIT: 'INIT',
812
- WAIT_RX_OFFER: 'WAIT_RX_OFFER',
813
- WAIT_RX_ANSWER: 'WAIT_RX_ANSWER',
814
- WAIT_RX_OK: 'WAIT_RX_OK',
815
- WAIT_TX_OFFER: 'WAIT_TX_OFFER',
816
- WAIT_TX_ANSWER: 'WAIT_TX_ANSWER',
817
- WAIT_TX_OK: 'WAIT_TX_OK',
818
- IDLE_LOCAL_OFFER: 'IDLE_LOCAL_OFFER',
819
- IDLE_REMOTE_OFFER: 'IDLE_REMOTE_OFFER',
820
- GLARE: 'GLARE',
821
- ERROR: 'ERROR'
822
- },
823
- ROAP_SIGNAL: {
824
- RX_OFFER: 'RX_OFFER',
825
- TX_OFFER: 'TX_OFFER',
826
- RX_ANSWER: 'RX_ANSWER',
827
- TX_ANSWER: 'TX_ANSWER',
828
- RX_OK: 'RX_OK',
829
- TX_OK: 'TX_OK',
830
- GLARE_RESOLVED: 'GLARE_RESOLVED'
831
- },
832
- RECEIVE_ROAP_MSG: 'RECEIVE_ROAP_MSG',
833
- SEND_ROAP_MSG: 'SEND_ROAP_MSG',
834
- SEND_ROAP_MSG_SUCCESS: 'SEND_ROAP_MSG_SUCCESS',
835
- RESET_ROAP_STATE: 'RESET_ROAP_STATE',
836
- RECEIVE_CALL_LEAVE: 'RECEIVE_CALL_LEAVE',
837
827
  ROAP_MERCURY: 'event:locus.message.roap',
838
828
  ROAP_VERSION: '2',
839
- RX_: 'RX_',
840
- TX_: 'TX_'
841
829
  };
842
830
 
843
831
  export const MediaContent = {
844
832
  main: 'main',
845
- slides: 'slides'
846
- };
847
-
848
- export const SDP = {
849
- A_CONTENT_SLIDES: 'a=content:slides',
850
- ROLLBACK: 'rollback',
851
- HAVE_LOCAL_OFFER: 'have-local-offer',
852
- HAVE_REMOTE_OFFER: 'have-remote-offer',
853
- STABLE: 'stable',
854
- OFFER: 'offer',
855
- M_LINE: 'm=',
856
- MAX_FS: 'max-fs=',
857
- B_LINE: 'b=TIAS',
858
- // Edonus repeated key frames request
859
- PERIODIC_KEYFRAME: 'a=periodic-keyframes:20',
860
- CARRIAGE_RETURN: '\r\n',
861
- BAD_MEDIA_PORTS: [0]
833
+ slides: 'slides',
862
834
  };
863
835
 
864
836
  export const NETWORK_STATUS = {
865
837
  DISCONNECTED: 'DISCONNECTED',
866
838
  RECONNECTING: 'RECONNECTING',
867
- CONNECTED: 'CONNECTED'
839
+ CONNECTED: 'CONNECTED',
868
840
  };
869
841
 
870
842
  export const NETWORK_TYPE = {
871
843
  VPN: 'vpn',
872
844
  UNKNOWN: 'unknown',
873
845
  WIFI: 'wifi',
874
- ETHERNET: 'ethernet'
846
+ ETHERNET: 'ethernet',
875
847
  };
876
848
 
877
849
  export const STATS = {
@@ -895,7 +867,7 @@ export const MQA_STATS = {
895
867
  isMain: false, // always true for share sender
896
868
  mariFecEnabled: false, // unavailable
897
869
  mariQosEnabled: false, // unavailable
898
- multistreamEnabled: false // unavailable
870
+ multistreamEnabled: false, // unavailable
899
871
  },
900
872
  availableBitrate: 0,
901
873
  dtlsBitrate: 0, // unavailable
@@ -914,7 +886,7 @@ export const MQA_STATS = {
914
886
  rtpPackets: 0,
915
887
  stunBitrate: 0, // unavailable
916
888
  stunPackets: 0, // unavailable
917
- transportType: 'UDP' // TODO: parse the transport type from the SDP and save globally
889
+ transportType: 'UDP', // TODO: parse the transport type from the SDP and save globally
918
890
  },
919
891
  streams: [
920
892
  {
@@ -926,7 +898,7 @@ export const MQA_STATS = {
926
898
  rtpPackets: 0,
927
899
  ssci: 0, // unavailable
928
900
  transmittedBitrate: 0,
929
- transmittedFrameRate: 0
901
+ transmittedFrameRate: 0,
930
902
  },
931
903
  h264CodecProfile: 'BP', // TODO: parse the profile level from h264 in the SDP and save globally
932
904
  localConfigurationChanges: 0, // unavailable
@@ -936,9 +908,9 @@ export const MQA_STATS = {
936
908
  transmittedFrameSize: 0, // unavailable
937
909
  transmittedHeight: 0,
938
910
  transmittedKeyFrames: 0,
939
- transmittedWidth: 0
940
- }
941
- ]
911
+ transmittedWidth: 0,
912
+ },
913
+ ],
942
914
  },
943
915
  intervalMetadata: {
944
916
  memoryUsage: {
@@ -949,18 +921,19 @@ export const MQA_STATS = {
949
921
  processMaximumMemoryBytes: 0,
950
922
  processMaximumMemoryUsage: 0,
951
923
  systemAverageMemoryUsage: 0,
952
- systemMaximumMemoryUsage: 0
924
+ systemMaximumMemoryUsage: 0,
953
925
  },
954
926
  peerReflexiveIP: 'NULL', // TODO: save after ice trickling completes and use as a global variable
955
927
  processAverageCPU: 0,
956
928
  processMaximumCPU: 0,
957
929
  systemAverageCPU: 0,
958
- systemMaximumCPU: 0
959
- }
930
+ systemMaximumCPU: 0,
931
+ },
960
932
  };
961
933
 
962
934
  // ****** MEDIA QUALITY CONSTANTS ****** //
963
935
 
936
+ // these values must match allowed values of RemoteQualityLevel from the @webex/internal-media-core lib
964
937
  export const QUALITY_LEVELS = {
965
938
  LOW: 'LOW',
966
939
  MEDIUM: 'MEDIUM',
@@ -971,56 +944,55 @@ export const QUALITY_LEVELS = {
971
944
  '1080p': '1080p',
972
945
  };
973
946
 
974
-
975
947
  export const AVAILABLE_RESOLUTIONS = {
976
948
  '360p': {
977
949
  video: {
978
950
  width: {
979
951
  max: 640,
980
- ideal: 640
952
+ ideal: 640,
981
953
  },
982
954
  height: {
983
955
  max: 360,
984
- ideal: 360
985
- }
986
- }
956
+ ideal: 360,
957
+ },
958
+ },
987
959
  },
988
960
  '480p': {
989
961
  video: {
990
962
  width: {
991
963
  max: 640,
992
- ideal: 640
964
+ ideal: 640,
993
965
  },
994
966
  height: {
995
967
  max: 480,
996
- ideal: 480
997
- }
998
- }
968
+ ideal: 480,
969
+ },
970
+ },
999
971
  },
1000
972
  '720p': {
1001
973
  video: {
1002
974
  width: {
1003
975
  max: 1280,
1004
- ideal: 1280
976
+ ideal: 1280,
1005
977
  },
1006
978
  height: {
1007
979
  max: 720,
1008
- ideal: 720
1009
- }
1010
- }
980
+ ideal: 720,
981
+ },
982
+ },
1011
983
  },
1012
984
  '1080p': {
1013
985
  video: {
1014
986
  width: {
1015
987
  max: 1920,
1016
- ideal: 1920
988
+ ideal: 1920,
1017
989
  },
1018
990
  height: {
1019
991
  max: 1080,
1020
- ideal: 1080
1021
- }
1022
- }
1023
- }
992
+ ideal: 1080,
993
+ },
994
+ },
995
+ },
1024
996
  };
1025
997
 
1026
998
  export const VIDEO_RESOLUTIONS = {
@@ -1033,29 +1005,16 @@ export const VIDEO_RESOLUTIONS = {
1033
1005
  [QUALITY_LEVELS['1080p']]: AVAILABLE_RESOLUTIONS['1080p'],
1034
1006
  };
1035
1007
 
1036
- /**
1037
- * Max frame sizes based on h264 configs
1038
- * https://en.wikipedia.org/wiki/Advanced_Video_Coding
1039
- */
1040
- export const REMOTE_VIDEO_CONSTRAINTS = {
1041
- MAX_FS: {
1042
- [QUALITY_LEVELS.LOW]: 1620,
1043
- [QUALITY_LEVELS.MEDIUM]: 3600,
1044
- [QUALITY_LEVELS.HIGH]: 8192
1045
- }
1046
- };
1047
-
1048
1008
  /*
1049
- * mqa Interval for sending stats metrics
1050
- */
1009
+ * mqa Interval for sending stats metrics
1010
+ */
1051
1011
 
1052
1012
  export const MQA_INTEVAL = 60000; // mqa analyzer interval its fixed to 60000
1053
1013
 
1054
-
1055
1014
  export const MEDIA_DEVICES = {
1056
1015
  MICROPHONE: 'microphone',
1057
1016
  SPEAKER: 'speaker',
1058
- CAMERA: 'camera'
1017
+ CAMERA: 'camera',
1059
1018
  };
1060
1019
 
1061
1020
  export const METRICS_JOIN_TIMES_MAX_DURATION = 1200000;
@@ -1066,31 +1025,31 @@ export const PSTN_STATUS = {
1066
1025
  LEFT: 'LEFT', // user has disconnected from the pstn device
1067
1026
  TRANSFERRING: 'TRANSFERRING', // usually happens in dial-out after the CONNECTED state
1068
1027
  SUCCESS: 'SUCCESS', // happens after the transfer (TRANSFERRING) is successful
1069
- UNKNOWN: '' // placeholder if we haven't been told what the status is
1028
+ UNKNOWN: '', // placeholder if we haven't been told what the status is
1070
1029
  };
1071
1030
 
1072
1031
  export const PASSWORD_STATUS = {
1073
1032
  NOT_REQUIRED: 'NOT_REQUIRED', // password is not required to join the meeting
1074
1033
  REQUIRED: 'REQUIRED', // client needs to provide the password by calling verifyPassword() before calling join()
1075
1034
  UNKNOWN: 'UNKNOWN', // we are waiting for information from the backend if password is required or not
1076
- VERIFIED: 'VERIFIED' // client has already provided the password and it has been verified, client can proceed to call join()
1035
+ VERIFIED: 'VERIFIED', // client has already provided the password and it has been verified, client can proceed to call join()
1077
1036
  };
1078
1037
 
1079
1038
  export const MEETING_INFO_FAILURE_REASON = {
1080
1039
  NONE: 'NONE', // meeting info was retrieved succesfully
1081
1040
  WRONG_PASSWORD: 'WRONG_PASSWORD', // meeting requires password and no password or wrong one was provided
1082
1041
  WRONG_CAPTCHA: 'WRONG_CAPTCHA', // wbxappapi requires a captcha code or a wrong captcha code was provided
1083
- OTHER: 'OTHER' // any other error (network, etc)
1042
+ OTHER: 'OTHER', // any other error (network, etc)
1084
1043
  };
1085
1044
 
1086
1045
  export const BNR_STATUS = {
1087
1046
  SHOULD_ENABLE: 'SHOULD_ENABLE',
1088
1047
  ENABLED: 'ENABLED',
1089
1048
  SHOULD_DISABLE: 'SHOULD_DISABLE',
1090
- NOT_ENABLED: 'NOT_ENABLED'
1049
+ NOT_ENABLED: 'NOT_ENABLED',
1091
1050
  };
1092
1051
 
1093
1052
  export const EMBEDDED_APP_TYPES = {
1094
1053
  SLIDO: 'SLIDO',
1095
- OTHER: 'OTHER'
1054
+ OTHER: 'OTHER',
1096
1055
  };