@webex/plugin-meetings 3.8.1-next.12 → 3.8.1-next.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.
- package/README.md +13 -26
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/media/index.js +2 -2
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/index.js +71 -76
- package/dist/meeting/index.js.map +1 -1
- package/dist/reachability/index.js +10 -5
- package/dist/reachability/index.js.map +1 -1
- package/dist/types/meeting/index.d.ts +0 -7
- package/dist/types/reachability/index.d.ts +2 -2
- package/dist/webinar/index.js +1 -1
- package/package.json +24 -24
- package/src/media/index.ts +2 -2
- package/src/meeting/index.ts +26 -41
- package/src/reachability/index.ts +13 -5
- package/test/unit/spec/media/index.ts +0 -107
- package/test/unit/spec/meeting/index.js +27 -119
- package/test/unit/spec/reachability/index.ts +6 -2
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:
|
34
|
-
Hosted Sample App:
|
35
|
-
See
|
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
|
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
|
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
|
-
|
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`
|
1208
|
-
| `members:self:update`
|
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-
|
1255
|
+
© 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
|
package/dist/breakouts/index.js
CHANGED
@@ -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.
|
1113
|
+
version: "3.8.1-next.2"
|
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.
|
376
|
+
version: "3.8.1-next.2"
|
377
377
|
});
|
378
378
|
var _default = exports.default = SimultaneousInterpretation;
|
379
379
|
//# sourceMappingURL=index.js.map
|
package/dist/media/index.js
CHANGED
@@ -193,8 +193,8 @@ Media.createMediaConnection = function (isMultistream, debugId, meetingId, optio
|
|
193
193
|
},
|
194
194
|
|
195
195
|
direction: {
|
196
|
-
audio: Media.getDirection(
|
197
|
-
video: Media.getDirection(
|
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
|
package/dist/media/index.js.map
CHANGED
@@ -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,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,SAAA,CAAAC,MAAA,EAAAZ,CAAA,UAAAC,CAAA,WAAAU,SAAA,CAAAX,CAAA,IAAAW,SAAA,CAAAX,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAe,MAAA,CAAAZ,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,CAAAC,OAAA,EAAAjB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD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,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,CAA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AAY,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"}
|
package/dist/meeting/index.js
CHANGED
@@ -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
|
-
|
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, {
|
@@ -5381,6 +5378,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
5381
5378
|
|
5382
5379
|
// Only send restore event when it was disconnected before and for connected later
|
5383
5380
|
if (!_this27.hasWebsocketConnected) {
|
5381
|
+
// @ts-ignore
|
5382
|
+
_this27.webex.internal.newMetrics.submitClientEvent({
|
5383
|
+
name: 'client.mercury.connection.restored',
|
5384
|
+
options: {
|
5385
|
+
meetingId: _this27.id
|
5386
|
+
}
|
5387
|
+
});
|
5384
5388
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
|
5385
5389
|
correlation_id: _this27.correlationId
|
5386
5390
|
});
|
@@ -5391,6 +5395,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
5391
5395
|
// @ts-ignore
|
5392
5396
|
this.webex.internal.mercury.on(_constants.OFFLINE, function () {
|
5393
5397
|
_loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
|
5398
|
+
// @ts-ignore
|
5399
|
+
_this27.webex.internal.newMetrics.submitClientEvent({
|
5400
|
+
name: 'client.mercury.connection.lost',
|
5401
|
+
options: {
|
5402
|
+
meetingId: _this27.id
|
5403
|
+
}
|
5404
|
+
});
|
5394
5405
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
|
5395
5406
|
correlation_id: _this27.correlationId
|
5396
5407
|
});
|
@@ -7630,16 +7641,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7630
7641
|
remoteMediaManagerConfig,
|
7631
7642
|
_options$bundlePolicy,
|
7632
7643
|
bundlePolicy,
|
7633
|
-
_options$additionalMe,
|
7634
|
-
additionalMediaOptions,
|
7635
|
-
rawSendVideo,
|
7636
|
-
rawReceiveVideo,
|
7637
|
-
rawSendAudio,
|
7638
|
-
rawReceiveAudio,
|
7639
|
-
sendVideo,
|
7640
|
-
receiveVideo,
|
7641
|
-
sendAudio,
|
7642
|
-
receiveAudio,
|
7643
7644
|
_this$remoteMediaMana,
|
7644
7645
|
_yield$this$mediaProp,
|
7645
7646
|
connectionType,
|
@@ -7696,22 +7697,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7696
7697
|
}
|
7697
7698
|
throw new _webexErrors.UserNotJoinedError();
|
7698
7699
|
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
|
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);
|
7700
|
+
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
7701
|
this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
|
7706
7702
|
|
7707
7703
|
// If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
|
7708
7704
|
// @ts-ignore - isUserUnadmitted coming from SelfUtil
|
7709
7705
|
if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
|
7710
|
-
_context35.next =
|
7706
|
+
_context35.next = 14;
|
7711
7707
|
break;
|
7712
7708
|
}
|
7713
7709
|
throw new _webexErrors.UserInLobbyError();
|
7714
|
-
case
|
7710
|
+
case 14:
|
7715
7711
|
// @ts-ignore
|
7716
7712
|
this.webex.internal.newMetrics.submitClientEvent({
|
7717
7713
|
name: 'client.media.capabilities',
|
@@ -7741,67 +7737,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7741
7737
|
// when audioEnabled/videoEnabled is true, we set sendAudio/sendVideo to true even before any streams are published
|
7742
7738
|
// to avoid doing an extra SDP exchange when they are published for the first time
|
7743
7739
|
this.mediaProperties.setMediaDirection({
|
7744
|
-
sendAudio:
|
7745
|
-
sendVideo:
|
7740
|
+
sendAudio: audioEnabled,
|
7741
|
+
sendVideo: videoEnabled,
|
7746
7742
|
sendShare: false,
|
7747
|
-
receiveAudio:
|
7748
|
-
receiveVideo:
|
7743
|
+
receiveAudio: audioEnabled,
|
7744
|
+
receiveVideo: videoEnabled,
|
7749
7745
|
receiveShare: shareAudioEnabled || shareVideoEnabled
|
7750
7746
|
});
|
7751
7747
|
this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
|
7752
7748
|
this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
|
7753
7749
|
this.brbState = (0, _brbState.createBrbState)(this, false);
|
7754
|
-
_context35.prev =
|
7755
|
-
_context35.next =
|
7750
|
+
_context35.prev = 19;
|
7751
|
+
_context35.next = 22;
|
7756
7752
|
return this.setUpLocalStreamReferences(localStreams);
|
7757
|
-
case
|
7753
|
+
case 22:
|
7758
7754
|
this.setMercuryListener();
|
7759
7755
|
this.createStatsAnalyzer();
|
7760
|
-
_context35.prev =
|
7761
|
-
_context35.next =
|
7756
|
+
_context35.prev = 24;
|
7757
|
+
_context35.next = 27;
|
7762
7758
|
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
|
7763
|
-
case
|
7764
|
-
_context35.next =
|
7759
|
+
case 27:
|
7760
|
+
_context35.next = 40;
|
7765
7761
|
break;
|
7766
|
-
case
|
7767
|
-
_context35.prev =
|
7768
|
-
_context35.t0 = _context35["catch"](
|
7762
|
+
case 29:
|
7763
|
+
_context35.prev = 29;
|
7764
|
+
_context35.t0 = _context35["catch"](24);
|
7769
7765
|
if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
|
7770
|
-
_context35.next =
|
7766
|
+
_context35.next = 39;
|
7771
7767
|
break;
|
7772
7768
|
}
|
7773
7769
|
_loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
|
7774
|
-
_context35.next =
|
7770
|
+
_context35.next = 35;
|
7775
7771
|
return this.downgradeFromMultistreamToTranscoded();
|
7776
|
-
case
|
7777
|
-
_context35.next =
|
7772
|
+
case 35:
|
7773
|
+
_context35.next = 37;
|
7778
7774
|
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
|
7779
|
-
case
|
7780
|
-
_context35.next =
|
7775
|
+
case 37:
|
7776
|
+
_context35.next = 40;
|
7781
7777
|
break;
|
7782
|
-
case
|
7778
|
+
case 39:
|
7783
7779
|
throw _context35.t0;
|
7784
|
-
case
|
7780
|
+
case 40:
|
7785
7781
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
|
7786
7782
|
if (!this.mediaProperties.hasLocalShareStream()) {
|
7787
|
-
_context35.next =
|
7783
|
+
_context35.next = 44;
|
7788
7784
|
break;
|
7789
7785
|
}
|
7790
|
-
_context35.next =
|
7786
|
+
_context35.next = 44;
|
7791
7787
|
return this.enqueueScreenShareFloorRequest();
|
7792
|
-
case
|
7793
|
-
_context35.next =
|
7788
|
+
case 44:
|
7789
|
+
_context35.next = 46;
|
7794
7790
|
return this.mediaProperties.getCurrentConnectionInfo();
|
7795
|
-
case
|
7791
|
+
case 46:
|
7796
7792
|
_yield$this$mediaProp = _context35.sent;
|
7797
7793
|
connectionType = _yield$this$mediaProp.connectionType;
|
7798
7794
|
ipVersion = _yield$this$mediaProp.ipVersion;
|
7799
7795
|
selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
|
7800
7796
|
numTransports = _yield$this$mediaProp.numTransports;
|
7801
7797
|
iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
|
7802
|
-
_context35.next =
|
7798
|
+
_context35.next = 54;
|
7803
7799
|
return this.getMediaReachabilityMetricFields();
|
7804
|
-
case
|
7800
|
+
case 54:
|
7805
7801
|
reachabilityMetrics = _context35.sent;
|
7806
7802
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
|
7807
7803
|
correlation_id: this.correlationId,
|
@@ -7831,21 +7827,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7831
7827
|
// We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
|
7832
7828
|
(_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
|
7833
7829
|
this.startPeriodicLogUpload();
|
7834
|
-
_context35.next =
|
7830
|
+
_context35.next = 80;
|
7835
7831
|
break;
|
7836
|
-
case
|
7837
|
-
_context35.prev =
|
7838
|
-
_context35.t1 = _context35["catch"](
|
7832
|
+
case 62:
|
7833
|
+
_context35.prev = 62;
|
7834
|
+
_context35.t1 = _context35["catch"](19);
|
7839
7835
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
|
7840
7836
|
|
7841
7837
|
// @ts-ignore
|
7842
|
-
_context35.next =
|
7838
|
+
_context35.next = 67;
|
7843
7839
|
return this.getMediaReachabilityMetricFields();
|
7844
|
-
case
|
7840
|
+
case 67:
|
7845
7841
|
_reachabilityMetrics = _context35.sent;
|
7846
|
-
_context35.next =
|
7842
|
+
_context35.next = 70;
|
7847
7843
|
return this.mediaProperties.getCurrentConnectionInfo();
|
7848
|
-
case
|
7844
|
+
case 70:
|
7849
7845
|
_yield$this$mediaProp2 = _context35.sent;
|
7850
7846
|
_selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
|
7851
7847
|
_numTransports = _yield$this$mediaProp2.numTransports;
|
@@ -7869,9 +7865,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7869
7865
|
}, _reachabilityMetrics), _iceCandidateErrors), {}, {
|
7870
7866
|
iceCandidatesCount: this.iceCandidatesCount
|
7871
7867
|
}));
|
7872
|
-
_context35.next =
|
7868
|
+
_context35.next = 77;
|
7873
7869
|
return this.cleanUpOnAddMediaFailure();
|
7874
|
-
case
|
7870
|
+
case 77:
|
7875
7871
|
// Upload logs on error while adding media
|
7876
7872
|
_triggerProxy.default.trigger(this, {
|
7877
7873
|
file: 'meeting/index',
|
@@ -7883,15 +7879,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7883
7879
|
});
|
7884
7880
|
}
|
7885
7881
|
throw _context35.t1;
|
7886
|
-
case
|
7887
|
-
_context35.prev =
|
7882
|
+
case 80:
|
7883
|
+
_context35.prev = 80;
|
7888
7884
|
this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
|
7889
|
-
return _context35.finish(
|
7890
|
-
case
|
7885
|
+
return _context35.finish(80);
|
7886
|
+
case 83:
|
7891
7887
|
case "end":
|
7892
7888
|
return _context35.stop();
|
7893
7889
|
}
|
7894
|
-
}, _callee35, this, [[
|
7890
|
+
}, _callee35, this, [[19, 62, 80, 83], [24, 29]]);
|
7895
7891
|
}));
|
7896
7892
|
function addMediaInternal(_x33, _x34, _x35) {
|
7897
7893
|
return _addMediaInternal.apply(this, arguments);
|
@@ -9440,8 +9436,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
9440
9436
|
key: "getMediaReachabilityMetricFields",
|
9441
9437
|
value: (function () {
|
9442
9438
|
var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
|
9443
|
-
var
|
9444
|
-
var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
|
9439
|
+
var reachabilityMetrics, successKeys, totalSuccessCases, isSubnetReachable, selectedCluster;
|
9445
9440
|
return _regenerator.default.wrap(function _callee42$(_context42) {
|
9446
9441
|
while (1) switch (_context42.prev = _context42.next) {
|
9447
9442
|
case 0:
|
@@ -9457,18 +9452,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
9457
9452
|
}
|
9458
9453
|
return total;
|
9459
9454
|
}, 0);
|
9460
|
-
selectedSubnetFirstOctet = (_this$mediaServerIp = this.mediaServerIp) === null || _this$mediaServerIp === void 0 ? void 0 : _this$mediaServerIp.split('.')[0];
|
9461
9455
|
isSubnetReachable = null;
|
9462
|
-
if (totalSuccessCases > 0
|
9463
|
-
isSubnetReachable =
|
9456
|
+
if (totalSuccessCases > 0) {
|
9464
9457
|
// @ts-ignore
|
9465
|
-
this.webex.meetings.reachability.isSubnetReachable(
|
9458
|
+
isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
|
9459
|
+
}
|
9460
|
+
selectedCluster = null;
|
9461
|
+
if (this.mediaConnections && this.mediaConnections.length > 0) {
|
9462
|
+
selectedCluster = this.mediaConnections[0].mediaAgentCluster;
|
9466
9463
|
}
|
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
9464
|
return _context42.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
|
9469
|
-
|
9470
|
-
|
9471
|
-
selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
|
9465
|
+
isSubnetReachable: isSubnetReachable,
|
9466
|
+
selectedCluster: selectedCluster
|
9472
9467
|
}));
|
9473
9468
|
case 10:
|
9474
9469
|
case "end":
|