@webex/plugin-meetings 3.8.1-next.12 → 3.8.1-next.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/README.md CHANGED
@@ -30,9 +30,9 @@ This is a plugin for the Cisco Webex JS SDK . Please see our [developer portal](
30
30
 
31
31
  ## API Docs and Sample App
32
32
 
33
- API Docs: <https://webex.github.io/webex-js-sdk/api/>
34
- Hosted Sample App: <https://webex.github.io/webex-js-sdk/samples/browser-plugin-meetings/>
35
- See <https://github.com/webex/webex-js-sdk/tree/master/docs/samples/browser-plugin-meetings> for the sample app code vs the readme
33
+ API Docs: https://webex.github.io/webex-js-sdk/api/
34
+ Hosted Sample App: https://webex.github.io/webex-js-sdk/samples/browser-plugin-meetings/
35
+ See https://github.com/webex/webex-js-sdk/tree/master/docs/samples/browser-plugin-meetings for the sample app code vs the readme
36
36
 
37
37
  #### Device Registration
38
38
 
@@ -110,7 +110,6 @@ webex.meetings.syncMeetings().then(() => {
110
110
  ```
111
111
 
112
112
  Or, to keep meetings with an locus url that is still active and any meeting without a locus url:
113
-
114
113
  ```js
115
114
  let existingMeetings;
116
115
  // Sync Meetings From Server
@@ -344,7 +343,6 @@ webex.meetings.on('meeting:added', (addedMeeting) => {
344
343
  addedMeeting.join().then(() => {});
345
344
  }
346
345
  ```
347
-
348
346
  ##### Reject an incoming meeting
349
347
 
350
348
  When listening to an added meeting, to determine if it is an "incoming" meeting, check the type property of the meeting:
@@ -470,9 +468,7 @@ audioOutputSelect.onchange = function () {
470
468
  attachSinkId(document.getElementById('remoteaudio'), audioOutputSelect.value);
471
469
  };
472
470
  ```
473
-
474
- ##### Available joining options
475
-
471
+ ##### Availabel joining options
476
472
  ```
477
473
  /**
478
474
  * Make a network request to join a meeting
@@ -494,29 +490,21 @@ audioOutputSelect.onchange = function () {
494
490
  * @returns {Promise}
495
491
  */
496
492
  ```
497
-
498
493
  ##### options.deviceCapabilities
499
-
500
494
  This option provides toggles that Locus service needs, and those toggles will control the performance or features of the meetings to be joined, see examples:
501
-
502
495
  ###### Breakout Sessions
503
-
504
496
  ```
505
497
  if (breakoutsSupported) {
506
498
  deviceCapabilities.push(BREAKOUTS.BREAKOUTS_SUPPORTED);
507
499
  }
508
500
  ```
509
-
510
501
  ###### Live Annotation
511
-
512
502
  ```
513
503
  if (liveAnnotationSupported) {
514
504
  deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);
515
505
  }
516
506
  ```
517
-
518
507
  ###### Audio Disclaimer
519
-
520
508
  ```
521
509
  const joinOptions = {
522
510
  locale: 'en_UK', // audio disclaimer language
@@ -707,7 +695,7 @@ webex.meetings.personalMeetingRoom.get().then((pmr) => {
707
695
 
708
696
  #### Usage of Webex Devices
709
697
 
710
- For details on how to use the devices see <https://github.com/webex/webex-js-sdk/tree/master/packages/node_modules/%40webex/plugin-device-manager>
698
+ For details on how to use the devices see https://github.com/webex/webex-js-sdk/tree/master/packages/node_modules/%40webex/plugin-device-manager
711
699
 
712
700
  ##### Leave a Meeting Using a Device
713
701
 
@@ -797,7 +785,7 @@ meeting.reconnect();
797
785
 
798
786
  #### Scheduled Meetings
799
787
 
800
- For scheduled meetings see <https://github.com/webex/webex-js-sdk/tree/master/packages/node_modules/%40webex/internal-plugin-calendar>
788
+ For scheduled meetings see https://github.com/webex/webex-js-sdk/tree/master/packages/node_modules/%40webex/internal-plugin-calendar
801
789
 
802
790
  #### Member
803
791
 
@@ -1199,14 +1187,13 @@ meeting.members.on(...)
1199
1187
  ```
1200
1188
 
1201
1189
  There are several events submitted by this package that you can subscribe to.
1202
-
1203
- | Event Name | Description |
1204
- | ------------------------ | --------------------------------------------------------------------------------- |
1205
- | `members:update` | Fired when a member in the collection has been updated |
1190
+ | Event Name | Description |
1191
+ |---|---|
1192
+ | `members:update` | Fired when a member in the collection has been updated |
1206
1193
  | `members:content:update` | Fired when a member in the collection has a changed content stream (share screen) |
1207
- | `members:host:update` | Fired when a member in the collection has a changed host value |
1208
- | `members:self:update` | Fired when a member in the collection has a changed self value |
1209
- | --- | --- |
1194
+ | `members:host:update` | Fired when a member in the collection has a changed host value |
1195
+ | `members:self:update` | Fired when a member in the collection has a changed self value |
1196
+ |---|---|
1210
1197
 
1211
1198
  `members:update` has the following payload
1212
1199
 
@@ -1265,4 +1252,4 @@ Pull requests welcome. Please see [CONTRIBUTING.md](https://github.com/webex/web
1265
1252
 
1266
1253
  ## License
1267
1254
 
1268
- © 2016-2025 Cisco and/or its affiliates. All Rights Reserved.
1255
+ © 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
@@ -209,7 +209,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
209
209
  sessionId: this.sessionId
210
210
  });
211
211
  },
212
- version: "3.8.1-next.12"
212
+ version: "3.8.1-next.3"
213
213
  });
214
214
  var _default = exports.default = Breakout;
215
215
  //# sourceMappingURL=breakout.js.map
@@ -1110,7 +1110,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1110
1110
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1111
1111
  }
1112
1112
  },
1113
- version: "3.8.1-next.12"
1113
+ version: "3.8.1-next.3"
1114
1114
  });
1115
1115
  var _default = exports.default = Breakouts;
1116
1116
  //# sourceMappingURL=index.js.map
@@ -373,7 +373,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
373
373
  throw error;
374
374
  });
375
375
  },
376
- version: "3.8.1-next.12"
376
+ version: "3.8.1-next.3"
377
377
  });
378
378
  var _default = exports.default = SimultaneousInterpretation;
379
379
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.8.1-next.12"
21
+ version: "3.8.1-next.3"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -193,8 +193,8 @@ Media.createMediaConnection = function (isMultistream, debugId, meetingId, optio
193
193
  },
194
194
 
195
195
  direction: {
196
- audio: Media.getDirection(false, mediaDirection.receiveAudio, mediaDirection.sendAudio),
197
- video: Media.getDirection(false, mediaDirection.receiveVideo, mediaDirection.sendVideo),
196
+ audio: Media.getDirection(true, mediaDirection.receiveAudio, mediaDirection.sendAudio),
197
+ video: Media.getDirection(true, mediaDirection.receiveVideo, mediaDirection.sendVideo),
198
198
  screenShareVideo: Media.getDirection(false, mediaDirection.receiveShare, mediaDirection.sendShare)
199
199
  },
200
200
  remoteQualityLevel: remoteQualityLevel
@@ -1 +1 @@
1
- {"version":3,"names":["_internalMediaCore","require","_webCapabilities","_loggerProxy","_interopRequireDefault","_constants","_config","_config2","_browserDetection","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_BrowserDetection","BrowserDetection","isBrowser","Media","getLocalMedia","options","config","sendAudio","sendVideo","sendShare","sharePreferences","isSharing","getMedia","getDisplayMedia","_promise","resolve","undefined","getDirection","forceSendRecv","receive","send","createMediaConnection","isMultistream","debugId","meetingId","_audioStream$outputSt","_videoStream$outputSt","_shareVideoStream$out","_shareAudioStream$out","rtcMetrics","mediaProperties","remoteQualityLevel","enableRtx","enableExtmap","turnServerInfo","bundlePolicy","iceCandidatesTimeout","disableAudioMainDtx","enableAudioTwcc","stopIceGatheringAfterFirstRelayCandidate","iceServers","urls","username","credential","password","disableAudioTwcc","BrowserInfo","isFirefox","doFullIce","MultistreamRoapMediaConnection","data","addMetrics","closeMetrics","sendMetricsInQueue","Error","mediaDirection","audioStream","videoStream","shareVideoStream","shareAudioStream","RoapMediaConnection","skipInactiveTransceivers","requireH264","sdpMunging","convertPort9to0","addContentSlides","bandwidthLimits","audio","StaticConfig","meetings","bandwidth","video","startBitrate","periodicKeyframes","disableExtmap","disableRtx","localTracks","outputStream","getTracks","screenShareVideo","screenShareAudio","direction","receiveAudio","receiveVideo","receiveShare","customResolution","screenResolution","customShareFrameRate","screenFrameRate","hasSharePreferences","hasCustomConstraints","shareConstraints","hasHighFrameRate","highFrameRate","_Config$meetings","Config","resolution","videoShareFrameRate","aspectRatio","cursor","MEDIA_TRACK_CONSTRAINT","CURSOR","AWLAYS","frameRate","height","idealHeight","width","idealWidth","mediaConfig","navigator","mediaDevices","then","stream","getVideoTracks","applyConstraints","getDisplayMediaParams","defaultWidth","ideal","max","maxWidth","defaultHeight","maxHeight","deviceId","facingMode","fake","process","env","NODE_ENV","getUserMedia","catch","err","logPath","LoggerProxy","logger","error","concat","constraint","toggleStream","stopStream","stop","readyState","mediaSetting","audioVideo","localStream","shareStream","_default","exports"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/* globals navigator */\n\nimport {\n RoapMediaConnection,\n MultistreamRoapMediaConnection,\n type MultistreamConnectionConfig,\n} from '@webex/internal-media-core';\nimport {\n LocalStream,\n LocalCameraStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalMicrophoneStream,\n} from '@webex/media-helpers';\nimport {RtcMetrics} from '@webex/internal-plugin-metrics';\nimport {BrowserInfo} from '@webex/web-capabilities';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {MEDIA_TRACK_CONSTRAINT} from '../constants';\nimport Config from '../config';\nimport StaticConfig from '../common/config';\nimport BrowserDetection from '../common/browser-detection';\nimport {TurnServerInfo} from '../roap/types';\n\nconst {isBrowser} = BrowserDetection();\n\nexport type BundlePolicy = MultistreamConnectionConfig['bundlePolicy'];\n\n/**\n * MediaDirection\n * @typedef {Object} MediaDirection\n * @property {boolean} sendAudio\n * @property {boolean} receiveAudio\n * @property {boolean} sendVideo\n * @property {boolean} receiveVideo\n * @property {boolean} sendShare\n * @property {boolean} receiveShare\n */\n\n/**\n * SendOptions\n * @typedef {Object} SendOptions\n * @property sendAudio\n * @property sendVideo\n * @property sendShare\n * @property isSharing\n * @property {Object} sharePreferences\n */\n/**\n *\n * @public\n * @export\n * Mimic browser APIs as \"the ultimate browser\".\n * Handles the quirks of each browser.\n * Extends and enhances adapter.js, i.e., the \"media\" file from the web client.\n */\nconst Media: any = {};\n\n/**\n * make a browser call to get the media\n * @param {SendOptions} options\n * @param {Object} config SDK Configuration for meetings plugin\n * @returns {Promise}\n */\nMedia.getLocalMedia = (options: any, config: object) => {\n const {sendAudio, sendVideo, sendShare, sharePreferences, isSharing} = options;\n\n if (sendAudio || sendVideo) {\n return Media.getMedia(sendAudio, sendVideo, config);\n }\n\n if (sendShare && !isSharing) {\n return Media.getDisplayMedia(\n {\n sendAudio: false,\n sendShare: true,\n sharePreferences,\n },\n config\n );\n }\n\n return Promise.resolve(undefined);\n};\n\nMedia.getDirection = (forceSendRecv: boolean, receive: boolean, send: boolean) => {\n if (!receive && !send) {\n return 'inactive';\n }\n\n if (forceSendRecv || (receive && send)) {\n return 'sendrecv';\n }\n\n if (receive) {\n return 'recvonly';\n }\n\n return 'sendonly';\n};\n\n/**\n * creates a webrtc media connection with provided tracks and mediaDirection configuration\n *\n * @param {boolean} isMultistream\n * @param {string} debugId string useful for debugging (will appear in media connection logs)\n * @param {string} meetingId id for the meeting using this connection\n * @param {Object} options\n * @param {Object} [options.mediaProperties] contains mediaDirection and local tracks:\n * audioTrack, videoTrack, shareVideoTrack, and shareAudioTrack\n * @param {string} [options.remoteQualityLevel] LOW|MEDIUM|HIGH applicable only to non-multistream connections\n * @param {boolean} [options.enableRtx] applicable only to non-multistream connections\n * @param {boolean} [options.enableExtmap] applicable only to non-multistream connections\n * @param {Object} [options.turnServerInfo]\n * @param {BundlePolicy} [options.bundlePolicy]\n * @returns {RoapMediaConnection | MultistreamRoapMediaConnection}\n */\nMedia.createMediaConnection = (\n isMultistream: boolean,\n debugId: string,\n meetingId: string,\n options: {\n rtcMetrics?: RtcMetrics;\n mediaProperties: {\n mediaDirection?: {\n receiveAudio: boolean;\n receiveVideo: boolean;\n receiveShare: boolean;\n sendAudio: boolean;\n sendVideo: boolean;\n sendShare: boolean;\n };\n audioStream?: LocalMicrophoneStream;\n videoStream?: LocalCameraStream;\n shareVideoStream?: LocalDisplayStream;\n shareAudioStream?: LocalSystemAudioStream;\n };\n remoteQualityLevel?: 'LOW' | 'MEDIUM' | 'HIGH';\n enableRtx?: boolean;\n enableExtmap?: boolean;\n turnServerInfo?: TurnServerInfo;\n bundlePolicy?: BundlePolicy;\n iceCandidatesTimeout?: number;\n disableAudioMainDtx?: boolean;\n enableAudioTwcc?: boolean;\n stopIceGatheringAfterFirstRelayCandidate?: boolean;\n }\n) => {\n const {\n rtcMetrics,\n mediaProperties,\n remoteQualityLevel,\n enableRtx,\n enableExtmap,\n turnServerInfo,\n bundlePolicy,\n iceCandidatesTimeout,\n disableAudioMainDtx,\n enableAudioTwcc,\n stopIceGatheringAfterFirstRelayCandidate,\n } = options;\n\n const iceServers = [];\n\n // we might not have any TURN server if TURN discovery failed or wasn't done or we land on a video mesh node\n if (turnServerInfo?.urls.length > 0) {\n // TURN-TLS server\n iceServers.push({\n urls: turnServerInfo.urls,\n username: turnServerInfo.username || '',\n credential: turnServerInfo.password || '',\n });\n }\n\n if (isMultistream) {\n const config: MultistreamConnectionConfig = {\n iceServers,\n disableAudioTwcc: !enableAudioTwcc,\n };\n\n if (bundlePolicy) {\n config.bundlePolicy = bundlePolicy;\n }\n\n if (disableAudioMainDtx !== undefined) {\n config.disableAudioMainDtx = disableAudioMainDtx;\n }\n\n if (BrowserInfo.isFirefox()) {\n config.doFullIce = true;\n\n config.stopIceGatheringAfterFirstRelayCandidate = stopIceGatheringAfterFirstRelayCandidate;\n }\n\n return new MultistreamRoapMediaConnection(\n config,\n meetingId,\n /* the rtc metrics objects callbacks */\n (data) => rtcMetrics?.addMetrics(data),\n () => rtcMetrics?.closeMetrics(),\n () => rtcMetrics?.sendMetricsInQueue()\n );\n }\n\n if (!mediaProperties) {\n throw new Error('mediaProperties have to be provided for non-multistream media connections');\n }\n\n const {mediaDirection, audioStream, videoStream, shareVideoStream, shareAudioStream} =\n mediaProperties;\n\n return new RoapMediaConnection(\n {\n iceServers,\n iceCandidatesTimeout,\n skipInactiveTransceivers: false,\n requireH264: true,\n sdpMunging: {\n convertPort9to0: false,\n addContentSlides: true,\n bandwidthLimits: {\n audio: StaticConfig.meetings.bandwidth.audio,\n video: StaticConfig.meetings.bandwidth.video,\n },\n startBitrate: StaticConfig.meetings.bandwidth.startBitrate,\n periodicKeyframes: 20, // it's always been hardcoded in SDK so for now keeping it that way\n disableExtmap: !enableExtmap,\n disableRtx: !enableRtx, // see https://bugs.chromium.org/p/chromium/issues/detail?id=1020642 why we might want to remove RTX from SDP\n },\n },\n {\n // TODO: RoapMediaConnection is not ready to use stream classes yet, so we pass the raw MediaStreamTrack for now SPARK-460530\n localTracks: {\n audio: audioStream?.outputStream?.getTracks()[0],\n video: videoStream?.outputStream?.getTracks()[0],\n screenShareVideo: shareVideoStream?.outputStream?.getTracks()[0],\n screenShareAudio: shareAudioStream?.outputStream?.getTracks()[0], // TODO: add type for screenShareAudio in internal-media-core SPARK-446923\n } as unknown,\n direction: {\n audio: Media.getDirection(false, mediaDirection.receiveAudio, mediaDirection.sendAudio),\n video: Media.getDirection(false, mediaDirection.receiveVideo, mediaDirection.sendVideo),\n screenShareVideo: Media.getDirection(\n false,\n mediaDirection.receiveShare,\n mediaDirection.sendShare\n ),\n },\n remoteQualityLevel,\n },\n debugId\n );\n};\n\n/**\n * generates share streams\n * @param {Object} options parameter\n * @param {Boolean} options.sendAudio send audio from the display share\n * @param {Boolean} options.sendShare send video from the display share\n * @param {Object} options.sharePreferences\n * @param {MediaTrackConstraints} options.sharePreferences.shareConstraints constraints to apply to video\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints}\n * @param {Boolean} options.sharePreferences.highFrameRate if shareConstraints isn't provided, set default values based off of this boolean\n * @param {Object} config SDK Configuration for meetings plugin\n * @returns {Promise.<MediaStream>}\n */\nMedia.getDisplayMedia = (\n options: {\n sendAudio: boolean;\n sendShare: boolean;\n sharePreferences: {\n shareConstraints: MediaTrackConstraints;\n highFrameRate: any;\n };\n },\n config: any = {}\n) => {\n // SDK screen share resolution settings from Webex.init\n const customResolution = config.screenResolution || {};\n // user defined screen share frame rate\n const customShareFrameRate = config.screenFrameRate || null;\n // user defined share preferences\n const hasSharePreferences = options.sharePreferences;\n const hasCustomConstraints = hasSharePreferences && hasSharePreferences.shareConstraints;\n const hasHighFrameRate = hasSharePreferences && hasSharePreferences.highFrameRate;\n const {screenResolution, resolution, videoShareFrameRate, screenFrameRate, aspectRatio} =\n Config.meetings;\n\n let shareConstraints: any = {\n cursor: MEDIA_TRACK_CONSTRAINT.CURSOR.AWLAYS,\n aspectRatio,\n };\n\n if (hasCustomConstraints) {\n shareConstraints = hasSharePreferences.shareConstraints;\n } else if (hasHighFrameRate) {\n shareConstraints = {\n ...shareConstraints,\n frameRate: videoShareFrameRate,\n height: resolution.idealHeight,\n width: resolution.idealWidth,\n ...config.resolution,\n };\n } else {\n shareConstraints = {\n ...shareConstraints,\n frameRate: customShareFrameRate || screenFrameRate,\n height: customResolution.idealHeight || screenResolution.idealHeight,\n width: customResolution.idealWidth || screenResolution.idealWidth,\n ...config.screenResolution,\n };\n }\n\n // chrome and webkit based browsers (edge, safari) automatically adjust everything\n // and we have noticed higher quality with those browser types\n // firefox specifically has some issues with resolution and frame rate decision making\n // so we are making it optional and configurable (with defaults) for firefox\n // to have higher quality, and for developers to control the values\n // eventually we may have to add the same functionality to chrome, OR conversely, get to with firefox\n\n if (isBrowser('firefox')) {\n const mediaConfig: any = {\n audio: options.sendAudio,\n video: options.sendShare,\n };\n\n return navigator.mediaDevices\n .getDisplayMedia({audio: options.sendAudio, video: mediaConfig})\n .then((stream) => {\n if (options.sendShare && stream.getVideoTracks().length > 0) {\n // Firefox has a bug with the spec where changing in the height and width only happens\n // after we get the inital tracks\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1321221\n stream.getVideoTracks()[0].applyConstraints(shareConstraints);\n }\n\n return stream;\n });\n }\n\n const getDisplayMediaParams: any = {video: options.sendShare ? shareConstraints : false};\n\n // safari doesn't support sending screen share audio\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia\n if (options.sendAudio && isBrowser('safari')) {\n getDisplayMediaParams.audio = options.sendAudio;\n }\n\n return navigator.mediaDevices.getDisplayMedia(getDisplayMediaParams);\n};\n\n/**\n * generates audio and video using constraints (often called after getSupportedDevices)\n * @param {Object|Boolean} audio gum constraints\n * @param {Object|Boolean} video gum constraints\n * @param {Object} config SDK Configuration for meetings plugin\n * @returns {Object} {streams}\n */\nMedia.getMedia = (audio: any | boolean, video: any | boolean, config: any) => {\n const defaultWidth = {ideal: config.resolution.idealWidth, max: config.resolution.maxWidth};\n const defaultHeight = {ideal: config.resolution.idealHeight, max: config.resolution.maxHeight};\n const mediaConfig = {\n audio,\n // TODO: Remove temporary workaround once Firefox fixes low constraint issues\n // eslint-disable-next-line no-nested-ternary\n video: video\n ? isBrowser('firefox') && video.width && video.width.max === 320\n ? {\n deviceId: video.deviceId ? video.deviceId : undefined,\n width: 320,\n height: 180,\n frameRate: video.frameRate ? video.frameRate : undefined,\n facingMode: video.facingMode ? video.facingMode : undefined,\n }\n : {\n deviceId: video.deviceId ? video.deviceId : undefined,\n width: video.width ? video.width : defaultWidth,\n height: video.height ? video.height : defaultHeight,\n frameRate: video.frameRate ? video.frameRate : undefined,\n facingMode: video.facingMode ? video.facingMode : undefined,\n }\n : false,\n fake: process.env.NODE_ENV === 'test', // Special case to get fake media for Firefox browser for testing\n };\n\n return navigator.mediaDevices.getUserMedia(mediaConfig).catch((err) => {\n const logPath = 'Media:index#getMedia --> navigator.mediaDevices.getUserMedia';\n\n LoggerProxy.logger.error(`${logPath} failed - ${err} (${err.constraint})`);\n throw err;\n });\n};\n\n/**\n *\n * Toggle a specific stream\n * noop as of now, does nothing\n * @returns {null}\n */\nMedia.toggleStream = () => {};\n\n/**\n * Stop input stream\n * @param {LocalStream} stream A local stream\n * @returns {null}\n */\nMedia.stopStream = (stream: LocalStream) => {\n if (!stream) {\n return Promise.resolve();\n }\n\n return Promise.resolve().then(() => {\n try {\n stream.stop();\n } catch (e) {\n LoggerProxy.logger.error(\n `Media:index#stopStream --> Unable to stop the stream with ready state => ${stream.readyState}, error: ${e}`\n );\n }\n });\n};\n\n/**\n * generates streams for audio video and share\n * @param {object} mediaSetting parameter\n * @param {Object} mediaSetting.sendAudio sendAudio: {Boolean} sendAudio constraints\n * @param {Object} mediaSetting.sendVideo sendVideo: {Boolean} sendVideo constraints\n * @param {Object} mediaSetting.sendShare sendShare: {Boolean} sendShare constraints\n * @param {Object} mediaSetting.isSharing isSharing: {Boolean} isSharing constraints\n * @param {Object} audioVideo parameter\n * @param {Object} audioVideo.audio {deviceId: {String}}\n * @param {Object} audioVideo.video {deviceId: {String}}\n * @param {Object} sharePreferences parameter\n * @param {Object} sharePreferences.shareConstraints parameter\n * @param {Boolean} sharePreferences.highFrameRate parameter\n * @param {Object} config SDK Config\n * @returns {Array} [localStream, shareStream]\n */\nMedia.getUserMedia = (\n mediaSetting: {\n sendAudio: object;\n sendVideo: object;\n sendShare: object;\n isSharing: object;\n },\n audioVideo: {\n audio: object;\n video: object;\n },\n sharePreferences: {\n shareConstraints: object;\n highFrameRate: boolean;\n },\n config: object\n) =>\n Media.getLocalMedia(\n {\n sendAudio: mediaSetting.sendAudio ? audioVideo.audio || mediaSetting.sendAudio : false,\n sendVideo: mediaSetting.sendVideo ? audioVideo.video || mediaSetting.sendVideo : false,\n },\n config\n ).then((localStream) =>\n Media.getLocalMedia(\n {\n sendShare: mediaSetting.sendShare,\n isSharing: mediaSetting.isSharing,\n sharePreferences,\n },\n config\n ).then((shareStream) => [localStream, shareStream])\n );\n\nexport default Media;\n"],"mappings":";;;;;;;;;;;;;;;AAKA,IAAAA,kBAAA,G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,6EAAAC,MAAA,CACsDvB,MAAM,CAAC4B,UAAU,eAAAL,MAAA,CAAY5J,CAAC,CAC5G,CAAC;IACH;EACF,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAwB,KAAK,CAAC6H,YAAY,GAAG,UACnBa,YAKC,EACDC,UAGC,EACDpI,gBAGC,EACDJ,MAAc;EAAA,OAEdH,KAAK,CAACC,aAAa,CACjB;IACEG,SAAS,EAAEsI,YAAY,CAACtI,SAAS,GAAGuI,UAAU,CAAC3E,KAAK,IAAI0E,YAAY,CAACtI,SAAS,GAAG,KAAK;IACtFC,SAAS,EAAEqI,YAAY,CAACrI,SAAS,GAAGsI,UAAU,CAACvE,KAAK,IAAIsE,YAAY,CAACrI,SAAS,GAAG;EACnF,CAAC,EACDF,MACF,CAAC,CAACyG,IAAI,CAAC,UAACgC,WAAW;IAAA,OACjB5I,KAAK,CAACC,aAAa,CACjB;MACEK,SAAS,EAAEoI,YAAY,CAACpI,SAAS;MACjCE,SAAS,EAAEkI,YAAY,CAAClI,SAAS;MACjCD,gBAAgB,EAAhBA;IACF,CAAC,EACDJ,MACF,CAAC,CAACyG,IAAI,CAAC,UAACiC,WAAW;MAAA,OAAK,CAACD,WAAW,EAAEC,WAAW,CAAC;IAAA,EAAC;EAAA,CACrD,CAAC;AAAA;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtJ,OAAA,GAEWO,KAAK"}
1
+ {"version":3,"names":["_internalMediaCore","require","_webCapabilities","_loggerProxy","_interopRequireDefault","_constants","_config","_config2","_browserDetection","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_BrowserDetection","BrowserDetection","isBrowser","Media","getLocalMedia","options","config","sendAudio","sendVideo","sendShare","sharePreferences","isSharing","getMedia","getDisplayMedia","_promise","resolve","undefined","getDirection","forceSendRecv","receive","send","createMediaConnection","isMultistream","debugId","meetingId","_audioStream$outputSt","_videoStream$outputSt","_shareVideoStream$out","_shareAudioStream$out","rtcMetrics","mediaProperties","remoteQualityLevel","enableRtx","enableExtmap","turnServerInfo","bundlePolicy","iceCandidatesTimeout","disableAudioMainDtx","enableAudioTwcc","stopIceGatheringAfterFirstRelayCandidate","iceServers","urls","username","credential","password","disableAudioTwcc","BrowserInfo","isFirefox","doFullIce","MultistreamRoapMediaConnection","data","addMetrics","closeMetrics","sendMetricsInQueue","Error","mediaDirection","audioStream","videoStream","shareVideoStream","shareAudioStream","RoapMediaConnection","skipInactiveTransceivers","requireH264","sdpMunging","convertPort9to0","addContentSlides","bandwidthLimits","audio","StaticConfig","meetings","bandwidth","video","startBitrate","periodicKeyframes","disableExtmap","disableRtx","localTracks","outputStream","getTracks","screenShareVideo","screenShareAudio","direction","receiveAudio","receiveVideo","receiveShare","customResolution","screenResolution","customShareFrameRate","screenFrameRate","hasSharePreferences","hasCustomConstraints","shareConstraints","hasHighFrameRate","highFrameRate","_Config$meetings","Config","resolution","videoShareFrameRate","aspectRatio","cursor","MEDIA_TRACK_CONSTRAINT","CURSOR","AWLAYS","frameRate","height","idealHeight","width","idealWidth","mediaConfig","navigator","mediaDevices","then","stream","getVideoTracks","applyConstraints","getDisplayMediaParams","defaultWidth","ideal","max","maxWidth","defaultHeight","maxHeight","deviceId","facingMode","fake","process","env","NODE_ENV","getUserMedia","catch","err","logPath","LoggerProxy","logger","error","concat","constraint","toggleStream","stopStream","stop","readyState","mediaSetting","audioVideo","localStream","shareStream","_default","exports"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/* globals navigator */\n\nimport {\n RoapMediaConnection,\n MultistreamRoapMediaConnection,\n type MultistreamConnectionConfig,\n} from '@webex/internal-media-core';\nimport {\n LocalStream,\n LocalCameraStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalMicrophoneStream,\n} from '@webex/media-helpers';\nimport {RtcMetrics} from '@webex/internal-plugin-metrics';\nimport {BrowserInfo} from '@webex/web-capabilities';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {MEDIA_TRACK_CONSTRAINT} from '../constants';\nimport Config from '../config';\nimport StaticConfig from '../common/config';\nimport BrowserDetection from '../common/browser-detection';\nimport {TurnServerInfo} from '../roap/types';\n\nconst {isBrowser} = BrowserDetection();\n\nexport type BundlePolicy = MultistreamConnectionConfig['bundlePolicy'];\n\n/**\n * MediaDirection\n * @typedef {Object} MediaDirection\n * @property {boolean} sendAudio\n * @property {boolean} receiveAudio\n * @property {boolean} sendVideo\n * @property {boolean} receiveVideo\n * @property {boolean} sendShare\n * @property {boolean} receiveShare\n */\n\n/**\n * SendOptions\n * @typedef {Object} SendOptions\n * @property sendAudio\n * @property sendVideo\n * @property sendShare\n * @property isSharing\n * @property {Object} sharePreferences\n */\n/**\n *\n * @public\n * @export\n * Mimic browser APIs as \"the ultimate browser\".\n * Handles the quirks of each browser.\n * Extends and enhances adapter.js, i.e., the \"media\" file from the web client.\n */\nconst Media: any = {};\n\n/**\n * make a browser call to get the media\n * @param {SendOptions} options\n * @param {Object} config SDK Configuration for meetings plugin\n * @returns {Promise}\n */\nMedia.getLocalMedia = (options: any, config: object) => {\n const {sendAudio, sendVideo, sendShare, sharePreferences, isSharing} = options;\n\n if (sendAudio || sendVideo) {\n return Media.getMedia(sendAudio, sendVideo, config);\n }\n\n if (sendShare && !isSharing) {\n return Media.getDisplayMedia(\n {\n sendAudio: false,\n sendShare: true,\n sharePreferences,\n },\n config\n );\n }\n\n return Promise.resolve(undefined);\n};\n\nMedia.getDirection = (forceSendRecv: boolean, receive: boolean, send: boolean) => {\n if (!receive && !send) {\n return 'inactive';\n }\n\n if (forceSendRecv || (receive && send)) {\n return 'sendrecv';\n }\n\n if (receive) {\n return 'recvonly';\n }\n\n return 'sendonly';\n};\n\n/**\n * creates a webrtc media connection with provided tracks and mediaDirection configuration\n *\n * @param {boolean} isMultistream\n * @param {string} debugId string useful for debugging (will appear in media connection logs)\n * @param {string} meetingId id for the meeting using this connection\n * @param {Object} options\n * @param {Object} [options.mediaProperties] contains mediaDirection and local tracks:\n * audioTrack, videoTrack, shareVideoTrack, and shareAudioTrack\n * @param {string} [options.remoteQualityLevel] LOW|MEDIUM|HIGH applicable only to non-multistream connections\n * @param {boolean} [options.enableRtx] applicable only to non-multistream connections\n * @param {boolean} [options.enableExtmap] applicable only to non-multistream connections\n * @param {Object} [options.turnServerInfo]\n * @param {BundlePolicy} [options.bundlePolicy]\n * @returns {RoapMediaConnection | MultistreamRoapMediaConnection}\n */\nMedia.createMediaConnection = (\n isMultistream: boolean,\n debugId: string,\n meetingId: string,\n options: {\n rtcMetrics?: RtcMetrics;\n mediaProperties: {\n mediaDirection?: {\n receiveAudio: boolean;\n receiveVideo: boolean;\n receiveShare: boolean;\n sendAudio: boolean;\n sendVideo: boolean;\n sendShare: boolean;\n };\n audioStream?: LocalMicrophoneStream;\n videoStream?: LocalCameraStream;\n shareVideoStream?: LocalDisplayStream;\n shareAudioStream?: LocalSystemAudioStream;\n };\n remoteQualityLevel?: 'LOW' | 'MEDIUM' | 'HIGH';\n enableRtx?: boolean;\n enableExtmap?: boolean;\n turnServerInfo?: TurnServerInfo;\n bundlePolicy?: BundlePolicy;\n iceCandidatesTimeout?: number;\n disableAudioMainDtx?: boolean;\n enableAudioTwcc?: boolean;\n stopIceGatheringAfterFirstRelayCandidate?: boolean;\n }\n) => {\n const {\n rtcMetrics,\n mediaProperties,\n remoteQualityLevel,\n enableRtx,\n enableExtmap,\n turnServerInfo,\n bundlePolicy,\n iceCandidatesTimeout,\n disableAudioMainDtx,\n enableAudioTwcc,\n stopIceGatheringAfterFirstRelayCandidate,\n } = options;\n\n const iceServers = [];\n\n // we might not have any TURN server if TURN discovery failed or wasn't done or we land on a video mesh node\n if (turnServerInfo?.urls.length > 0) {\n // TURN-TLS server\n iceServers.push({\n urls: turnServerInfo.urls,\n username: turnServerInfo.username || '',\n credential: turnServerInfo.password || '',\n });\n }\n\n if (isMultistream) {\n const config: MultistreamConnectionConfig = {\n iceServers,\n disableAudioTwcc: !enableAudioTwcc,\n };\n\n if (bundlePolicy) {\n config.bundlePolicy = bundlePolicy;\n }\n\n if (disableAudioMainDtx !== undefined) {\n config.disableAudioMainDtx = disableAudioMainDtx;\n }\n\n if (BrowserInfo.isFirefox()) {\n config.doFullIce = true;\n\n config.stopIceGatheringAfterFirstRelayCandidate = stopIceGatheringAfterFirstRelayCandidate;\n }\n\n return new MultistreamRoapMediaConnection(\n config,\n meetingId,\n /* the rtc metrics objects callbacks */\n (data) => rtcMetrics?.addMetrics(data),\n () => rtcMetrics?.closeMetrics(),\n () => rtcMetrics?.sendMetricsInQueue()\n );\n }\n\n if (!mediaProperties) {\n throw new Error('mediaProperties have to be provided for non-multistream media connections');\n }\n\n const {mediaDirection, audioStream, videoStream, shareVideoStream, shareAudioStream} =\n mediaProperties;\n\n return new RoapMediaConnection(\n {\n iceServers,\n iceCandidatesTimeout,\n skipInactiveTransceivers: false,\n requireH264: true,\n sdpMunging: {\n convertPort9to0: false,\n addContentSlides: true,\n bandwidthLimits: {\n audio: StaticConfig.meetings.bandwidth.audio,\n video: StaticConfig.meetings.bandwidth.video,\n },\n startBitrate: StaticConfig.meetings.bandwidth.startBitrate,\n periodicKeyframes: 20, // it's always been hardcoded in SDK so for now keeping it that way\n disableExtmap: !enableExtmap,\n disableRtx: !enableRtx, // see https://bugs.chromium.org/p/chromium/issues/detail?id=1020642 why we might want to remove RTX from SDP\n },\n },\n {\n // TODO: RoapMediaConnection is not ready to use stream classes yet, so we pass the raw MediaStreamTrack for now SPARK-460530\n localTracks: {\n audio: audioStream?.outputStream?.getTracks()[0],\n video: videoStream?.outputStream?.getTracks()[0],\n screenShareVideo: shareVideoStream?.outputStream?.getTracks()[0],\n screenShareAudio: shareAudioStream?.outputStream?.getTracks()[0], // TODO: add type for screenShareAudio in internal-media-core SPARK-446923\n } as unknown,\n direction: {\n audio: Media.getDirection(true, mediaDirection.receiveAudio, mediaDirection.sendAudio),\n video: Media.getDirection(true, mediaDirection.receiveVideo, mediaDirection.sendVideo),\n screenShareVideo: Media.getDirection(\n false,\n mediaDirection.receiveShare,\n mediaDirection.sendShare\n ),\n },\n remoteQualityLevel,\n },\n debugId\n );\n};\n\n/**\n * generates share streams\n * @param {Object} options parameter\n * @param {Boolean} options.sendAudio send audio from the display share\n * @param {Boolean} options.sendShare send video from the display share\n * @param {Object} options.sharePreferences\n * @param {MediaTrackConstraints} options.sharePreferences.shareConstraints constraints to apply to video\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints}\n * @param {Boolean} options.sharePreferences.highFrameRate if shareConstraints isn't provided, set default values based off of this boolean\n * @param {Object} config SDK Configuration for meetings plugin\n * @returns {Promise.<MediaStream>}\n */\nMedia.getDisplayMedia = (\n options: {\n sendAudio: boolean;\n sendShare: boolean;\n sharePreferences: {\n shareConstraints: MediaTrackConstraints;\n highFrameRate: any;\n };\n },\n config: any = {}\n) => {\n // SDK screen share resolution settings from Webex.init\n const customResolution = config.screenResolution || {};\n // user defined screen share frame rate\n const customShareFrameRate = config.screenFrameRate || null;\n // user defined share preferences\n const hasSharePreferences = options.sharePreferences;\n const hasCustomConstraints = hasSharePreferences && hasSharePreferences.shareConstraints;\n const hasHighFrameRate = hasSharePreferences && hasSharePreferences.highFrameRate;\n const {screenResolution, resolution, videoShareFrameRate, screenFrameRate, aspectRatio} =\n Config.meetings;\n\n let shareConstraints: any = {\n cursor: MEDIA_TRACK_CONSTRAINT.CURSOR.AWLAYS,\n aspectRatio,\n };\n\n if (hasCustomConstraints) {\n shareConstraints = hasSharePreferences.shareConstraints;\n } else if (hasHighFrameRate) {\n shareConstraints = {\n ...shareConstraints,\n frameRate: videoShareFrameRate,\n height: resolution.idealHeight,\n width: resolution.idealWidth,\n ...config.resolution,\n };\n } else {\n shareConstraints = {\n ...shareConstraints,\n frameRate: customShareFrameRate || screenFrameRate,\n height: customResolution.idealHeight || screenResolution.idealHeight,\n width: customResolution.idealWidth || screenResolution.idealWidth,\n ...config.screenResolution,\n };\n }\n\n // chrome and webkit based browsers (edge, safari) automatically adjust everything\n // and we have noticed higher quality with those browser types\n // firefox specifically has some issues with resolution and frame rate decision making\n // so we are making it optional and configurable (with defaults) for firefox\n // to have higher quality, and for developers to control the values\n // eventually we may have to add the same functionality to chrome, OR conversely, get to with firefox\n\n if (isBrowser('firefox')) {\n const mediaConfig: any = {\n audio: options.sendAudio,\n video: options.sendShare,\n };\n\n return navigator.mediaDevices\n .getDisplayMedia({audio: options.sendAudio, video: mediaConfig})\n .then((stream) => {\n if (options.sendShare && stream.getVideoTracks().length > 0) {\n // Firefox has a bug with the spec where changing in the height and width only happens\n // after we get the inital tracks\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1321221\n stream.getVideoTracks()[0].applyConstraints(shareConstraints);\n }\n\n return stream;\n });\n }\n\n const getDisplayMediaParams: any = {video: options.sendShare ? shareConstraints : false};\n\n // safari doesn't support sending screen share audio\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia\n if (options.sendAudio && isBrowser('safari')) {\n getDisplayMediaParams.audio = options.sendAudio;\n }\n\n return navigator.mediaDevices.getDisplayMedia(getDisplayMediaParams);\n};\n\n/**\n * generates audio and video using constraints (often called after getSupportedDevices)\n * @param {Object|Boolean} audio gum constraints\n * @param {Object|Boolean} video gum constraints\n * @param {Object} config SDK Configuration for meetings plugin\n * @returns {Object} {streams}\n */\nMedia.getMedia = (audio: any | boolean, video: any | boolean, config: any) => {\n const defaultWidth = {ideal: config.resolution.idealWidth, max: config.resolution.maxWidth};\n const defaultHeight = {ideal: config.resolution.idealHeight, max: config.resolution.maxHeight};\n const mediaConfig = {\n audio,\n // TODO: Remove temporary workaround once Firefox fixes low constraint issues\n // eslint-disable-next-line no-nested-ternary\n video: video\n ? isBrowser('firefox') && video.width && video.width.max === 320\n ? {\n deviceId: video.deviceId ? video.deviceId : undefined,\n width: 320,\n height: 180,\n frameRate: video.frameRate ? video.frameRate : undefined,\n facingMode: video.facingMode ? video.facingMode : undefined,\n }\n : {\n deviceId: video.deviceId ? video.deviceId : undefined,\n width: video.width ? video.width : defaultWidth,\n height: video.height ? video.height : defaultHeight,\n frameRate: video.frameRate ? video.frameRate : undefined,\n facingMode: video.facingMode ? video.facingMode : undefined,\n }\n : false,\n fake: process.env.NODE_ENV === 'test', // Special case to get fake media for Firefox browser for testing\n };\n\n return navigator.mediaDevices.getUserMedia(mediaConfig).catch((err) => {\n const logPath = 'Media:index#getMedia --> navigator.mediaDevices.getUserMedia';\n\n LoggerProxy.logger.error(`${logPath} failed - ${err} (${err.constraint})`);\n throw err;\n });\n};\n\n/**\n *\n * Toggle a specific stream\n * noop as of now, does nothing\n * @returns {null}\n */\nMedia.toggleStream = () => {};\n\n/**\n * Stop input stream\n * @param {LocalStream} stream A local stream\n * @returns {null}\n */\nMedia.stopStream = (stream: LocalStream) => {\n if (!stream) {\n return Promise.resolve();\n }\n\n return Promise.resolve().then(() => {\n try {\n stream.stop();\n } catch (e) {\n LoggerProxy.logger.error(\n `Media:index#stopStream --> Unable to stop the stream with ready state => ${stream.readyState}, error: ${e}`\n );\n }\n });\n};\n\n/**\n * generates streams for audio video and share\n * @param {object} mediaSetting parameter\n * @param {Object} mediaSetting.sendAudio sendAudio: {Boolean} sendAudio constraints\n * @param {Object} mediaSetting.sendVideo sendVideo: {Boolean} sendVideo constraints\n * @param {Object} mediaSetting.sendShare sendShare: {Boolean} sendShare constraints\n * @param {Object} mediaSetting.isSharing isSharing: {Boolean} isSharing constraints\n * @param {Object} audioVideo parameter\n * @param {Object} audioVideo.audio {deviceId: {String}}\n * @param {Object} audioVideo.video {deviceId: {String}}\n * @param {Object} sharePreferences parameter\n * @param {Object} sharePreferences.shareConstraints parameter\n * @param {Boolean} sharePreferences.highFrameRate parameter\n * @param {Object} config SDK Config\n * @returns {Array} [localStream, shareStream]\n */\nMedia.getUserMedia = (\n mediaSetting: {\n sendAudio: object;\n sendVideo: object;\n sendShare: object;\n isSharing: object;\n },\n audioVideo: {\n audio: object;\n video: object;\n },\n sharePreferences: {\n shareConstraints: object;\n highFrameRate: boolean;\n },\n config: object\n) =>\n Media.getLocalMedia(\n {\n sendAudio: mediaSetting.sendAudio ? audioVideo.audio || mediaSetting.sendAudio : false,\n sendVideo: mediaSetting.sendVideo ? audioVideo.video || mediaSetting.sendVideo : false,\n },\n config\n ).then((localStream) =>\n Media.getLocalMedia(\n {\n sendShare: mediaSetting.sendShare,\n isSharing: mediaSetting.isSharing,\n sharePreferences,\n },\n config\n ).then((shareStream) => [localStream, shareStream])\n );\n\nexport default Media;\n"],"mappings":";;;;;;;;;;;;;;;AAKA,IAAAA,kBAAA,GAAAC,OAAA;AAaA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,QAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,iBAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAA2D,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA;AAAA,SAAAS,cAAAX,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAW,S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I,SAAS;MACjCE,SAAS,EAAEkI,YAAY,CAAClI,SAAS;MACjCD,gBAAgB,EAAhBA;IACF,CAAC,EACDJ,MACF,CAAC,CAACyG,IAAI,CAAC,UAACiC,WAAW;MAAA,OAAK,CAACD,WAAW,EAAEC,WAAW,CAAC;IAAA,EAAC;EAAA,CACrD,CAAC;AAAA;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtJ,OAAA,GAEWO,KAAK"}
@@ -3405,10 +3405,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3405
3405
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, function (_ref12) {
3406
3406
  var spokenLanguage = _ref12.spokenLanguage;
3407
3407
  if (spokenLanguage) {
3408
- var _this14$transcription;
3409
- if ((_this14$transcription = _this14.transcription) !== null && _this14$transcription !== void 0 && _this14$transcription.languageOptions) {
3410
- _this14.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
3411
- }
3408
+ _this14.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
3412
3409
  // @ts-ignore
3413
3410
  _this14.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage);
3414
3411
  _triggerProxy.default.trigger(_this14, {
@@ -7630,16 +7627,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7630
7627
  remoteMediaManagerConfig,
7631
7628
  _options$bundlePolicy,
7632
7629
  bundlePolicy,
7633
- _options$additionalMe,
7634
- additionalMediaOptions,
7635
- rawSendVideo,
7636
- rawReceiveVideo,
7637
- rawSendAudio,
7638
- rawReceiveAudio,
7639
- sendVideo,
7640
- receiveVideo,
7641
- sendAudio,
7642
- receiveAudio,
7643
7630
  _this$remoteMediaMana,
7644
7631
  _yield$this$mediaProp,
7645
7632
  connectionType,
@@ -7696,22 +7683,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7696
7683
  }
7697
7684
  throw new _webexErrors.UserNotJoinedError();
7698
7685
  case 10:
7699
- localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, _options$bundlePolicy = options.bundlePolicy, bundlePolicy = _options$bundlePolicy === void 0 ? 'max-bundle' : _options$bundlePolicy, _options$additionalMe = options.additionalMediaOptions, additionalMediaOptions = _options$additionalMe === void 0 ? {} : _options$additionalMe;
7700
- rawSendVideo = additionalMediaOptions.sendVideo, rawReceiveVideo = additionalMediaOptions.receiveVideo, rawSendAudio = additionalMediaOptions.sendAudio, rawReceiveAudio = additionalMediaOptions.receiveAudio;
7701
- sendVideo = videoEnabled && (rawSendVideo !== null && rawSendVideo !== void 0 ? rawSendVideo : true);
7702
- receiveVideo = videoEnabled && (rawReceiveVideo !== null && rawReceiveVideo !== void 0 ? rawReceiveVideo : true);
7703
- sendAudio = audioEnabled && (rawSendAudio !== null && rawSendAudio !== void 0 ? rawSendAudio : true);
7704
- receiveAudio = audioEnabled && (rawReceiveAudio !== null && rawReceiveAudio !== void 0 ? rawReceiveAudio : true);
7686
+ localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, _options$bundlePolicy = options.bundlePolicy, bundlePolicy = _options$bundlePolicy === void 0 ? 'max-bundle' : _options$bundlePolicy;
7705
7687
  this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
7706
7688
 
7707
7689
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7708
7690
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7709
7691
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7710
- _context35.next = 19;
7692
+ _context35.next = 14;
7711
7693
  break;
7712
7694
  }
7713
7695
  throw new _webexErrors.UserInLobbyError();
7714
- case 19:
7696
+ case 14:
7715
7697
  // @ts-ignore
7716
7698
  this.webex.internal.newMetrics.submitClientEvent({
7717
7699
  name: 'client.media.capabilities',
@@ -7741,67 +7723,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7741
7723
  // when audioEnabled/videoEnabled is true, we set sendAudio/sendVideo to true even before any streams are published
7742
7724
  // to avoid doing an extra SDP exchange when they are published for the first time
7743
7725
  this.mediaProperties.setMediaDirection({
7744
- sendAudio: sendAudio,
7745
- sendVideo: sendVideo,
7726
+ sendAudio: audioEnabled,
7727
+ sendVideo: videoEnabled,
7746
7728
  sendShare: false,
7747
- receiveAudio: receiveAudio,
7748
- receiveVideo: receiveVideo,
7729
+ receiveAudio: audioEnabled,
7730
+ receiveVideo: videoEnabled,
7749
7731
  receiveShare: shareAudioEnabled || shareVideoEnabled
7750
7732
  });
7751
7733
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7752
7734
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7753
7735
  this.brbState = (0, _brbState.createBrbState)(this, false);
7754
- _context35.prev = 24;
7755
- _context35.next = 27;
7736
+ _context35.prev = 19;
7737
+ _context35.next = 22;
7756
7738
  return this.setUpLocalStreamReferences(localStreams);
7757
- case 27:
7739
+ case 22:
7758
7740
  this.setMercuryListener();
7759
7741
  this.createStatsAnalyzer();
7760
- _context35.prev = 29;
7761
- _context35.next = 32;
7742
+ _context35.prev = 24;
7743
+ _context35.next = 27;
7762
7744
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7763
- case 32:
7764
- _context35.next = 45;
7745
+ case 27:
7746
+ _context35.next = 40;
7765
7747
  break;
7766
- case 34:
7767
- _context35.prev = 34;
7768
- _context35.t0 = _context35["catch"](29);
7748
+ case 29:
7749
+ _context35.prev = 29;
7750
+ _context35.t0 = _context35["catch"](24);
7769
7751
  if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
7770
- _context35.next = 44;
7752
+ _context35.next = 39;
7771
7753
  break;
7772
7754
  }
7773
7755
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
7774
- _context35.next = 40;
7756
+ _context35.next = 35;
7775
7757
  return this.downgradeFromMultistreamToTranscoded();
7776
- case 40:
7777
- _context35.next = 42;
7758
+ case 35:
7759
+ _context35.next = 37;
7778
7760
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
7779
- case 42:
7780
- _context35.next = 45;
7761
+ case 37:
7762
+ _context35.next = 40;
7781
7763
  break;
7782
- case 44:
7764
+ case 39:
7783
7765
  throw _context35.t0;
7784
- case 45:
7766
+ case 40:
7785
7767
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
7786
7768
  if (!this.mediaProperties.hasLocalShareStream()) {
7787
- _context35.next = 49;
7769
+ _context35.next = 44;
7788
7770
  break;
7789
7771
  }
7790
- _context35.next = 49;
7772
+ _context35.next = 44;
7791
7773
  return this.enqueueScreenShareFloorRequest();
7792
- case 49:
7793
- _context35.next = 51;
7774
+ case 44:
7775
+ _context35.next = 46;
7794
7776
  return this.mediaProperties.getCurrentConnectionInfo();
7795
- case 51:
7777
+ case 46:
7796
7778
  _yield$this$mediaProp = _context35.sent;
7797
7779
  connectionType = _yield$this$mediaProp.connectionType;
7798
7780
  ipVersion = _yield$this$mediaProp.ipVersion;
7799
7781
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7800
7782
  numTransports = _yield$this$mediaProp.numTransports;
7801
7783
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7802
- _context35.next = 59;
7784
+ _context35.next = 54;
7803
7785
  return this.getMediaReachabilityMetricFields();
7804
- case 59:
7786
+ case 54:
7805
7787
  reachabilityMetrics = _context35.sent;
7806
7788
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7807
7789
  correlation_id: this.correlationId,
@@ -7831,21 +7813,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7831
7813
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7832
7814
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7833
7815
  this.startPeriodicLogUpload();
7834
- _context35.next = 85;
7816
+ _context35.next = 80;
7835
7817
  break;
7836
- case 67:
7837
- _context35.prev = 67;
7838
- _context35.t1 = _context35["catch"](24);
7818
+ case 62:
7819
+ _context35.prev = 62;
7820
+ _context35.t1 = _context35["catch"](19);
7839
7821
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7840
7822
 
7841
7823
  // @ts-ignore
7842
- _context35.next = 72;
7824
+ _context35.next = 67;
7843
7825
  return this.getMediaReachabilityMetricFields();
7844
- case 72:
7826
+ case 67:
7845
7827
  _reachabilityMetrics = _context35.sent;
7846
- _context35.next = 75;
7828
+ _context35.next = 70;
7847
7829
  return this.mediaProperties.getCurrentConnectionInfo();
7848
- case 75:
7830
+ case 70:
7849
7831
  _yield$this$mediaProp2 = _context35.sent;
7850
7832
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7851
7833
  _numTransports = _yield$this$mediaProp2.numTransports;
@@ -7869,9 +7851,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7869
7851
  }, _reachabilityMetrics), _iceCandidateErrors), {}, {
7870
7852
  iceCandidatesCount: this.iceCandidatesCount
7871
7853
  }));
7872
- _context35.next = 82;
7854
+ _context35.next = 77;
7873
7855
  return this.cleanUpOnAddMediaFailure();
7874
- case 82:
7856
+ case 77:
7875
7857
  // Upload logs on error while adding media
7876
7858
  _triggerProxy.default.trigger(this, {
7877
7859
  file: 'meeting/index',
@@ -7883,15 +7865,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7883
7865
  });
7884
7866
  }
7885
7867
  throw _context35.t1;
7886
- case 85:
7887
- _context35.prev = 85;
7868
+ case 80:
7869
+ _context35.prev = 80;
7888
7870
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7889
- return _context35.finish(85);
7890
- case 88:
7871
+ return _context35.finish(80);
7872
+ case 83:
7891
7873
  case "end":
7892
7874
  return _context35.stop();
7893
7875
  }
7894
- }, _callee35, this, [[24, 67, 85, 88], [29, 34]]);
7876
+ }, _callee35, this, [[19, 62, 80, 83], [24, 29]]);
7895
7877
  }));
7896
7878
  function addMediaInternal(_x33, _x34, _x35) {
7897
7879
  return _addMediaInternal.apply(this, arguments);
@@ -9440,8 +9422,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9440
9422
  key: "getMediaReachabilityMetricFields",
9441
9423
  value: (function () {
9442
9424
  var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
9443
- var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
9444
- var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
9425
+ var reachabilityMetrics, successKeys, totalSuccessCases, isSubnetReachable, selectedCluster;
9445
9426
  return _regenerator.default.wrap(function _callee42$(_context42) {
9446
9427
  while (1) switch (_context42.prev = _context42.next) {
9447
9428
  case 0:
@@ -9457,18 +9438,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9457
9438
  }
9458
9439
  return total;
9459
9440
  }, 0);
9460
- selectedSubnetFirstOctet = (_this$mediaServerIp = this.mediaServerIp) === null || _this$mediaServerIp === void 0 ? void 0 : _this$mediaServerIp.split('.')[0];
9461
9441
  isSubnetReachable = null;
9462
- if (totalSuccessCases > 0 && selectedSubnetFirstOctet) {
9463
- isSubnetReachable =
9442
+ if (totalSuccessCases > 0) {
9464
9443
  // @ts-ignore
9465
- this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
9444
+ isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
9445
+ }
9446
+ selectedCluster = null;
9447
+ if (this.mediaConnections && this.mediaConnections.length > 0) {
9448
+ selectedCluster = this.mediaConnections[0].mediaAgentCluster;
9466
9449
  }
9467
- selectedCluster = (_this$mediaConnection = (_this$mediaConnection2 = this.mediaConnections) === null || _this$mediaConnection2 === void 0 ? void 0 : (_this$mediaConnection3 = _this$mediaConnection2[0]) === null || _this$mediaConnection3 === void 0 ? void 0 : _this$mediaConnection3.mediaAgentCluster) !== null && _this$mediaConnection !== void 0 ? _this$mediaConnection : null;
9468
9450
  return _context42.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
9469
- subnet_reachable: isSubnetReachable,
9470
- selected_cluster: selectedCluster,
9471
- selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
9451
+ isSubnetReachable: isSubnetReachable,
9452
+ selectedCluster: selectedCluster
9472
9453
  }));
9473
9454
  case 10:
9474
9455
  case "end":