@webex/plugin-meetings 3.8.1-next.11 → 3.8.1-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +62 -47
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/meeting/index.d.ts +7 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/media/index.ts +2 -2
- package/src/meeting/index.ts +25 -4
- package/test/unit/spec/media/index.ts +107 -0
- package/test/unit/spec/meeting/index.js +69 -1
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.12"
|
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.12"
|
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.
|
21
|
+
version: "3.8.1-next.12"
|
22
22
|
});
|
23
23
|
var _default = exports.default = SILanguage;
|
24
24
|
//# sourceMappingURL=siLanguage.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(false, mediaDirection.receiveAudio, mediaDirection.sendAudio),
|
197
|
+
video: Media.getDirection(false, 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(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((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AC,CAAC;IACf,CAAC,CAAC,OAAOhK,CAAC,EAAE;MACVyJ,oBAAW,CAACC,MAAM,CAACC,KAAK,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(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,CAA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,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
@@ -7630,6 +7630,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7630
7630
|
remoteMediaManagerConfig,
|
7631
7631
|
_options$bundlePolicy,
|
7632
7632
|
bundlePolicy,
|
7633
|
+
_options$additionalMe,
|
7634
|
+
additionalMediaOptions,
|
7635
|
+
rawSendVideo,
|
7636
|
+
rawReceiveVideo,
|
7637
|
+
rawSendAudio,
|
7638
|
+
rawReceiveAudio,
|
7639
|
+
sendVideo,
|
7640
|
+
receiveVideo,
|
7641
|
+
sendAudio,
|
7642
|
+
receiveAudio,
|
7633
7643
|
_this$remoteMediaMana,
|
7634
7644
|
_yield$this$mediaProp,
|
7635
7645
|
connectionType,
|
@@ -7686,17 +7696,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7686
7696
|
}
|
7687
7697
|
throw new _webexErrors.UserNotJoinedError();
|
7688
7698
|
case 10:
|
7689
|
-
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;
|
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);
|
7690
7705
|
this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
|
7691
7706
|
|
7692
7707
|
// If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
|
7693
7708
|
// @ts-ignore - isUserUnadmitted coming from SelfUtil
|
7694
7709
|
if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
|
7695
|
-
_context35.next =
|
7710
|
+
_context35.next = 19;
|
7696
7711
|
break;
|
7697
7712
|
}
|
7698
7713
|
throw new _webexErrors.UserInLobbyError();
|
7699
|
-
case
|
7714
|
+
case 19:
|
7700
7715
|
// @ts-ignore
|
7701
7716
|
this.webex.internal.newMetrics.submitClientEvent({
|
7702
7717
|
name: 'client.media.capabilities',
|
@@ -7726,67 +7741,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7726
7741
|
// when audioEnabled/videoEnabled is true, we set sendAudio/sendVideo to true even before any streams are published
|
7727
7742
|
// to avoid doing an extra SDP exchange when they are published for the first time
|
7728
7743
|
this.mediaProperties.setMediaDirection({
|
7729
|
-
sendAudio:
|
7730
|
-
sendVideo:
|
7744
|
+
sendAudio: sendAudio,
|
7745
|
+
sendVideo: sendVideo,
|
7731
7746
|
sendShare: false,
|
7732
|
-
receiveAudio:
|
7733
|
-
receiveVideo:
|
7747
|
+
receiveAudio: receiveAudio,
|
7748
|
+
receiveVideo: receiveVideo,
|
7734
7749
|
receiveShare: shareAudioEnabled || shareVideoEnabled
|
7735
7750
|
});
|
7736
7751
|
this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
|
7737
7752
|
this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
|
7738
7753
|
this.brbState = (0, _brbState.createBrbState)(this, false);
|
7739
|
-
_context35.prev =
|
7740
|
-
_context35.next =
|
7754
|
+
_context35.prev = 24;
|
7755
|
+
_context35.next = 27;
|
7741
7756
|
return this.setUpLocalStreamReferences(localStreams);
|
7742
|
-
case
|
7757
|
+
case 27:
|
7743
7758
|
this.setMercuryListener();
|
7744
7759
|
this.createStatsAnalyzer();
|
7745
|
-
_context35.prev =
|
7746
|
-
_context35.next =
|
7760
|
+
_context35.prev = 29;
|
7761
|
+
_context35.next = 32;
|
7747
7762
|
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
|
7748
|
-
case
|
7749
|
-
_context35.next =
|
7763
|
+
case 32:
|
7764
|
+
_context35.next = 45;
|
7750
7765
|
break;
|
7751
|
-
case
|
7752
|
-
_context35.prev =
|
7753
|
-
_context35.t0 = _context35["catch"](
|
7766
|
+
case 34:
|
7767
|
+
_context35.prev = 34;
|
7768
|
+
_context35.t0 = _context35["catch"](29);
|
7754
7769
|
if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
|
7755
|
-
_context35.next =
|
7770
|
+
_context35.next = 44;
|
7756
7771
|
break;
|
7757
7772
|
}
|
7758
7773
|
_loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
|
7759
|
-
_context35.next =
|
7774
|
+
_context35.next = 40;
|
7760
7775
|
return this.downgradeFromMultistreamToTranscoded();
|
7761
|
-
case
|
7762
|
-
_context35.next =
|
7776
|
+
case 40:
|
7777
|
+
_context35.next = 42;
|
7763
7778
|
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
|
7764
|
-
case
|
7765
|
-
_context35.next =
|
7779
|
+
case 42:
|
7780
|
+
_context35.next = 45;
|
7766
7781
|
break;
|
7767
|
-
case
|
7782
|
+
case 44:
|
7768
7783
|
throw _context35.t0;
|
7769
|
-
case
|
7784
|
+
case 45:
|
7770
7785
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
|
7771
7786
|
if (!this.mediaProperties.hasLocalShareStream()) {
|
7772
|
-
_context35.next =
|
7787
|
+
_context35.next = 49;
|
7773
7788
|
break;
|
7774
7789
|
}
|
7775
|
-
_context35.next =
|
7790
|
+
_context35.next = 49;
|
7776
7791
|
return this.enqueueScreenShareFloorRequest();
|
7777
|
-
case
|
7778
|
-
_context35.next =
|
7792
|
+
case 49:
|
7793
|
+
_context35.next = 51;
|
7779
7794
|
return this.mediaProperties.getCurrentConnectionInfo();
|
7780
|
-
case
|
7795
|
+
case 51:
|
7781
7796
|
_yield$this$mediaProp = _context35.sent;
|
7782
7797
|
connectionType = _yield$this$mediaProp.connectionType;
|
7783
7798
|
ipVersion = _yield$this$mediaProp.ipVersion;
|
7784
7799
|
selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
|
7785
7800
|
numTransports = _yield$this$mediaProp.numTransports;
|
7786
7801
|
iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
|
7787
|
-
_context35.next =
|
7802
|
+
_context35.next = 59;
|
7788
7803
|
return this.getMediaReachabilityMetricFields();
|
7789
|
-
case
|
7804
|
+
case 59:
|
7790
7805
|
reachabilityMetrics = _context35.sent;
|
7791
7806
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
|
7792
7807
|
correlation_id: this.correlationId,
|
@@ -7816,21 +7831,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7816
7831
|
// We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
|
7817
7832
|
(_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
|
7818
7833
|
this.startPeriodicLogUpload();
|
7819
|
-
_context35.next =
|
7834
|
+
_context35.next = 85;
|
7820
7835
|
break;
|
7821
|
-
case
|
7822
|
-
_context35.prev =
|
7823
|
-
_context35.t1 = _context35["catch"](
|
7836
|
+
case 67:
|
7837
|
+
_context35.prev = 67;
|
7838
|
+
_context35.t1 = _context35["catch"](24);
|
7824
7839
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
|
7825
7840
|
|
7826
7841
|
// @ts-ignore
|
7827
|
-
_context35.next =
|
7842
|
+
_context35.next = 72;
|
7828
7843
|
return this.getMediaReachabilityMetricFields();
|
7829
|
-
case
|
7844
|
+
case 72:
|
7830
7845
|
_reachabilityMetrics = _context35.sent;
|
7831
|
-
_context35.next =
|
7846
|
+
_context35.next = 75;
|
7832
7847
|
return this.mediaProperties.getCurrentConnectionInfo();
|
7833
|
-
case
|
7848
|
+
case 75:
|
7834
7849
|
_yield$this$mediaProp2 = _context35.sent;
|
7835
7850
|
_selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
|
7836
7851
|
_numTransports = _yield$this$mediaProp2.numTransports;
|
@@ -7854,9 +7869,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7854
7869
|
}, _reachabilityMetrics), _iceCandidateErrors), {}, {
|
7855
7870
|
iceCandidatesCount: this.iceCandidatesCount
|
7856
7871
|
}));
|
7857
|
-
_context35.next =
|
7872
|
+
_context35.next = 82;
|
7858
7873
|
return this.cleanUpOnAddMediaFailure();
|
7859
|
-
case
|
7874
|
+
case 82:
|
7860
7875
|
// Upload logs on error while adding media
|
7861
7876
|
_triggerProxy.default.trigger(this, {
|
7862
7877
|
file: 'meeting/index',
|
@@ -7868,15 +7883,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7868
7883
|
});
|
7869
7884
|
}
|
7870
7885
|
throw _context35.t1;
|
7871
|
-
case
|
7872
|
-
_context35.prev =
|
7886
|
+
case 85:
|
7887
|
+
_context35.prev = 85;
|
7873
7888
|
this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
|
7874
|
-
return _context35.finish(
|
7875
|
-
case
|
7889
|
+
return _context35.finish(85);
|
7890
|
+
case 88:
|
7876
7891
|
case "end":
|
7877
7892
|
return _context35.stop();
|
7878
7893
|
}
|
7879
|
-
}, _callee35, this, [[
|
7894
|
+
}, _callee35, this, [[24, 67, 85, 88], [29, 34]]);
|
7880
7895
|
}));
|
7881
7896
|
function addMediaInternal(_x33, _x34, _x35) {
|
7882
7897
|
return _addMediaInternal.apply(this, arguments);
|