@webex/plugin-meetings 3.8.1-next.2 → 3.8.1-next.21
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 +26 -13
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +35 -16
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/index.js +2 -2
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/brbState.js +12 -12
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/index.js +85 -78
- package/dist/meeting/index.js.map +1 -1
- package/dist/members/index.js +8 -6
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +3 -3
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +18 -6
- package/dist/members/util.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +32 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/index.js +5 -10
- package/dist/reachability/index.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/meeting/brbState.d.ts +0 -1
- package/dist/types/meeting/index.d.ts +12 -3
- package/dist/types/members/index.d.ts +8 -3
- package/dist/types/members/request.d.ts +1 -1
- package/dist/types/members/util.d.ts +5 -2
- package/dist/types/multistream/sendSlotManager.d.ts +16 -0
- package/dist/types/reachability/index.d.ts +2 -2
- package/dist/webinar/index.js +1 -1
- package/package.json +24 -24
- package/src/constants.ts +1 -0
- package/src/locus-info/index.ts +46 -19
- package/src/media/index.ts +2 -2
- package/src/meeting/brbState.ts +8 -7
- package/src/meeting/index.ts +48 -32
- package/src/members/index.ts +7 -5
- package/src/members/request.ts +2 -2
- package/src/members/util.ts +14 -3
- package/src/multistream/sendSlotManager.ts +34 -2
- package/src/reachability/index.ts +5 -13
- package/test/unit/spec/locus-info/index.js +140 -44
- package/test/unit/spec/media/index.ts +107 -0
- package/test/unit/spec/meeting/brbState.ts +11 -9
- package/test/unit/spec/meeting/index.js +131 -39
- package/test/unit/spec/members/index.js +32 -9
- package/test/unit/spec/members/request.js +2 -2
- package/test/unit/spec/members/utils.js +27 -7
- package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
- package/test/unit/spec/reachability/index.ts +2 -6
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((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,CA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AAC;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,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,IAA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F,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/brbState.js
CHANGED
@@ -56,8 +56,11 @@ var BrbState = exports.BrbState = /*#__PURE__*/function () {
|
|
56
56
|
(0, _createClass2.default)(BrbState, [{
|
57
57
|
key: "enable",
|
58
58
|
value: function enable(enabled, sendSlotManager) {
|
59
|
+
var _this = this;
|
59
60
|
this.state.client.enabled = enabled;
|
60
|
-
return this.applyClientStateToServer(sendSlotManager)
|
61
|
+
return this.applyClientStateToServer(sendSlotManager).finally(function () {
|
62
|
+
sendSlotManager.setSourceStateOverride(_internalMediaCore.MediaType.VideoMain, _this.state.client.enabled ? 'away' : null);
|
63
|
+
});
|
61
64
|
}
|
62
65
|
|
63
66
|
/**
|
@@ -69,7 +72,7 @@ var BrbState = exports.BrbState = /*#__PURE__*/function () {
|
|
69
72
|
}, {
|
70
73
|
key: "applyClientStateToServer",
|
71
74
|
value: function applyClientStateToServer(sendSlotManager) {
|
72
|
-
var
|
75
|
+
var _this2 = this;
|
73
76
|
if (this.state.syncToServerInProgress) {
|
74
77
|
_loggerProxy.default.logger.info("Meeting:brbState#applyClientStateToServer: request to server in progress, we need to wait for it to complete");
|
75
78
|
return _promise.default.resolve();
|
@@ -81,20 +84,20 @@ var BrbState = exports.BrbState = /*#__PURE__*/function () {
|
|
81
84
|
return _promise.default.resolve();
|
82
85
|
}
|
83
86
|
this.state.syncToServerInProgress = true;
|
84
|
-
return this.sendLocalBrbStateToServer(
|
85
|
-
|
87
|
+
return this.sendLocalBrbStateToServer().then(function () {
|
88
|
+
_this2.state.syncToServerInProgress = false;
|
86
89
|
|
87
90
|
// This is a workaround for the fact that the server does not send the brb state
|
88
91
|
// in the locus update when a user joins from multiple devices but not all devices are requested brb.
|
89
92
|
// In the future, this could be improved with a new brb locus update handler
|
90
93
|
// https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-655626
|
91
|
-
|
94
|
+
_this2.handleServerBrbUpdate(_this2.state.client.enabled);
|
92
95
|
_loggerProxy.default.logger.info("Meeting:brbState#applyClientStateToServer: sync with server completed");
|
93
96
|
|
94
97
|
// need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync
|
95
|
-
|
98
|
+
_this2.applyClientStateToServer(sendSlotManager);
|
96
99
|
}).catch(function (error) {
|
97
|
-
|
100
|
+
_this2.state.syncToServerInProgress = false;
|
98
101
|
_loggerProxy.default.logger.warn("Meeting:brbState#applyClientStateToServer: Error: ".concat(error));
|
99
102
|
return _promise.default.reject(error);
|
100
103
|
});
|
@@ -103,13 +106,12 @@ var BrbState = exports.BrbState = /*#__PURE__*/function () {
|
|
103
106
|
/**
|
104
107
|
* Send the local brb state to the server
|
105
108
|
*
|
106
|
-
* @param {SendSlotManager} sendSlotManager
|
107
109
|
* @returns {Promise}
|
108
110
|
*/
|
109
111
|
}, {
|
110
112
|
key: "sendLocalBrbStateToServer",
|
111
113
|
value: (function () {
|
112
|
-
var _sendLocalBrbStateToServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(
|
114
|
+
var _sendLocalBrbStateToServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
113
115
|
var enabled, errorMessage, error, _errorMessage, _error;
|
114
116
|
return _regenerator.default.wrap(function _callee$(_context) {
|
115
117
|
while (1) switch (_context.prev = _context.next) {
|
@@ -138,8 +140,6 @@ var BrbState = exports.BrbState = /*#__PURE__*/function () {
|
|
138
140
|
locusUrl: this.meeting.locusUrl,
|
139
141
|
deviceUrl: this.meeting.deviceUrl,
|
140
142
|
selfId: this.meeting.selfId
|
141
|
-
}).then(function () {
|
142
|
-
sendSlotManager.setSourceStateOverride(_internalMediaCore.MediaType.VideoMain, enabled ? 'away' : null);
|
143
143
|
}).catch(function (error) {
|
144
144
|
_loggerProxy.default.logger.error('Meeting:brbState#sendLocalBrbStateToServer: Error ', error);
|
145
145
|
return _promise.default.reject(error);
|
@@ -150,7 +150,7 @@ var BrbState = exports.BrbState = /*#__PURE__*/function () {
|
|
150
150
|
}
|
151
151
|
}, _callee, this);
|
152
152
|
}));
|
153
|
-
function sendLocalBrbStateToServer(
|
153
|
+
function sendLocalBrbStateToServer() {
|
154
154
|
return _sendLocalBrbStateToServer.apply(this, arguments);
|
155
155
|
}
|
156
156
|
return sendLocalBrbStateToServer;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_internalMediaCore","require","_loggerProxy","_interopRequireDefault","createBrbState","exports","meeting","enabled","LoggerProxy","logger","info","concat","id","brbState","BrbState","_classCallCheck2","default","_defineProperty2","state","client","server","syncToServerInProgress","_createClass2","key","value","enable","sendSlotManager","applyClientStateToServer","_this","_promise","resolve","remoteBrbRequiresSync","sendLocalBrbStateToServer","then","handleServerBrbUpdate","catch","error","warn","reject","_sendLocalBrbStateToServer","_asyncToGenerator2","_regenerator","mark","_callee","errorMessage","_errorMessage","_error","wrap","_callee$","_context","prev","next","isMultistream","Error","abrupt","mediaProperties","webrtcMediaConnection","meetingRequest","setBrb","locusUrl","deviceUrl","selfId","setSourceStateOverride","MediaType","VideoMain","stop","_x","apply","arguments"],"sources":["brbState.ts"],"sourcesContent":["import {MediaType} from '@webex/internal-media-core';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport type Meeting from '.';\nimport SendSlotManager from '../multistream/sendSlotManager';\n\nexport const createBrbState = (meeting: Meeting, enabled: boolean) => {\n LoggerProxy.logger.info(\n `Meeting:brbState#createBrbState: creating BrbState for meeting id ${meeting?.id}`\n );\n\n const brbState = new BrbState(meeting, enabled);\n\n return brbState;\n};\n\n/** The purpose of this class is to manage the local and remote brb state\n * and make sure that the server state always matches the last requested state by the client.\n */\nexport class BrbState {\n state: {\n client: {\n enabled: boolean;\n };\n server: {\n enabled: boolean;\n };\n syncToServerInProgress: boolean;\n };\n\n meeting: Meeting;\n\n /**\n * Constructor\n *\n * @param {Meeting} meeting - the meeting object\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(meeting: Meeting, enabled: boolean) {\n this.meeting = meeting;\n this.state = {\n client: {\n enabled,\n },\n server: {\n enabled: false,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Enables/disables brb\n *\n * @param {boolean} enabled\n * @param {SendSlotManager} sendSlotManager\n * @returns {Promise}\n */\n public enable(enabled: boolean, sendSlotManager: SendSlotManager) {\n this.state.client.enabled = enabled;\n\n return this.applyClientStateToServer(sendSlotManager);\n }\n\n /**\n * Updates the server local and remote brb values so that they match the current client desired state.\n *\n * @param {SendSlotManager} sendSlotManager\n * @returns {Promise}\n */\n private applyClientStateToServer(sendSlotManager: SendSlotManager) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: request to server in progress, we need to wait for it to complete`\n );\n\n return Promise.resolve();\n }\n\n const remoteBrbRequiresSync = this.state.client.enabled !== this.state.server.enabled;\n\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: remoteBrbRequiresSync: ${remoteBrbRequiresSync}`\n );\n\n if (!remoteBrbRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: client state already matching server state, nothing to do`\n );\n\n return Promise.resolve();\n }\n\n this.state.syncToServerInProgress = true;\n\n return this.sendLocalBrbStateToServer(sendSlotManager)\n .then(() => {\n this.state.syncToServerInProgress = false;\n\n // This is a workaround for the fact that the server does not send the brb state\n // in the locus update when a user joins from multiple devices but not all devices are requested brb.\n // In the future, this could be improved with a new brb locus update handler\n // https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-655626\n this.handleServerBrbUpdate(this.state.client.enabled);\n\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(sendSlotManager);\n })\n .catch((error) => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.warn(`Meeting:brbState#applyClientStateToServer: Error: ${error}`);\n\n return Promise.reject(error);\n });\n }\n\n /**\n * Send the local brb state to the server\n *\n * @param {SendSlotManager} sendSlotManager\n * @returns {Promise}\n */\n private async sendLocalBrbStateToServer(sendSlotManager: SendSlotManager) {\n const {enabled} = this.state.client;\n\n if (!this.meeting.isMultistream) {\n const errorMessage = 'Meeting:brbState#sendLocalBrbStateToServer: Not a multistream meeting';\n const error = new Error(errorMessage);\n\n LoggerProxy.logger.error(error);\n\n return Promise.reject(error);\n }\n\n if (!this.meeting.mediaProperties.webrtcMediaConnection) {\n const errorMessage =\n 'Meeting:brbState#sendLocalBrbStateToServer: WebRTC media connection is not defined';\n const error = new Error(errorMessage);\n\n LoggerProxy.logger.error(error);\n\n return Promise.reject(error);\n }\n\n // this logic should be applied only to multistream meetings\n return this.meeting.meetingRequest\n .setBrb({\n enabled,\n locusUrl: this.meeting.locusUrl,\n deviceUrl: this.meeting.deviceUrl,\n selfId: this.meeting.selfId,\n })\n .then(() => {\n sendSlotManager.setSourceStateOverride(MediaType.VideoMain, enabled ? 'away' : null);\n })\n .catch((error) => {\n LoggerProxy.logger.error('Meeting:brbState#sendLocalBrbStateToServer: Error ', error);\n\n return Promise.reject(error);\n });\n }\n\n /**\n * This method should be called whenever the server brb state is changed\n *\n * @param {Boolean} [enabled] true if user has brb enabled, false otherwise\n * @returns {undefined}\n */\n public handleServerBrbUpdate(enabled?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:brbState#handleServerBrbUpdate: updating server brb to (${enabled})`\n );\n this.state.server.enabled = !!enabled;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAIO,IAAMG,cAAc,GAAAC,OAAA,CA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ACjCC,MAAM,EAAE,IAAI,CAACvD,OAAO,CAACuD;cACvB,CAAC,CAAC,CACD5B,IAAI,CAAC,YAAM;gBACVP,eAAe,CAACoC,sBAAsB,CAACC,4BAAS,CAACC,SAAS,EAAEzD,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;cACtF,CAAC,CAAC,CACD4B,KAAK,CAAC,UAACC,KAAK,EAAK;gBAChB5B,oBAAW,CAACC,MAAM,CAAC2B,KAAK,CAAC,oDAAoD,EAAEA,KAAK,CAAC;gBAErF,OAAOP,QAAA,CAAAb,OAAA,CAAQsB,MAAM,CAACF,KAAK,CAAC;cAC9B,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAa,QAAA,CAAAgB,IAAA;UAAA;QAAA,GAAAtB,OAAA;MAAA,CACL;MAAA,SAAAX,0BAAAkC,EAAA;QAAA,OAAA3B,0BAAA,CAAA4B,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAApC,yBAAA;IAAA;IAED;AACF;AACA;AACA;AACA;AACA;IALE;EAAA;IAAAT,GAAA;IAAAC,KAAA,EAMA,SAAAU,sBAA6B3B,OAAiB,EAAE;MAC9CC,oBAAW,CAACC,MAAM,CAACC,IAAI,oEAAAC,MAAA,CAC8CJ,OAAO,MAC5E,CAAC;MACD,IAAI,CAACW,KAAK,CAACE,MAAM,CAACb,OAAO,GAAG,CAAC,CAACA,OAAO;IACvC;EAAC;EAAA,OAAAO,QAAA;AAAA"}
|
1
|
+
{"version":3,"names":["_internalMediaCore","require","_loggerProxy","_interopRequireDefault","createBrbState","exports","meeting","enabled","LoggerProxy","logger","info","concat","id","brbState","BrbState","_classCallCheck2","default","_defineProperty2","state","client","server","syncToServerInProgress","_createClass2","key","value","enable","sendSlotManager","_this","applyClientStateToServer","finally","setSourceStateOverride","MediaType","VideoMain","_this2","_promise","resolve","remoteBrbRequiresSync","sendLocalBrbStateToServer","then","handleServerBrbUpdate","catch","error","warn","reject","_sendLocalBrbStateToServer","_asyncToGenerator2","_regenerator","mark","_callee","errorMessage","_errorMessage","_error","wrap","_callee$","_context","prev","next","isMultistream","Error","abrupt","mediaProperties","webrtcMediaConnection","meetingRequest","setBrb","locusUrl","deviceUrl","selfId","stop","apply","arguments"],"sources":["brbState.ts"],"sourcesContent":["import {MediaType} from '@webex/internal-media-core';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport type Meeting from '.';\nimport SendSlotManager from '../multistream/sendSlotManager';\n\nexport const createBrbState = (meeting: Meeting, enabled: boolean) => {\n LoggerProxy.logger.info(\n `Meeting:brbState#createBrbState: creating BrbState for meeting id ${meeting?.id}`\n );\n\n const brbState = new BrbState(meeting, enabled);\n\n return brbState;\n};\n\n/** The purpose of this class is to manage the local and remote brb state\n * and make sure that the server state always matches the last requested state by the client.\n */\nexport class BrbState {\n state: {\n client: {\n enabled: boolean;\n };\n server: {\n enabled: boolean;\n };\n syncToServerInProgress: boolean;\n };\n\n meeting: Meeting;\n\n /**\n * Constructor\n *\n * @param {Meeting} meeting - the meeting object\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(meeting: Meeting, enabled: boolean) {\n this.meeting = meeting;\n this.state = {\n client: {\n enabled,\n },\n server: {\n enabled: false,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Enables/disables brb\n *\n * @param {boolean} enabled\n * @param {SendSlotManager} sendSlotManager\n * @returns {Promise}\n */\n public enable(enabled: boolean, sendSlotManager: SendSlotManager) {\n this.state.client.enabled = enabled;\n\n return this.applyClientStateToServer(sendSlotManager).finally(() => {\n sendSlotManager.setSourceStateOverride(\n MediaType.VideoMain,\n this.state.client.enabled ? 'away' : null\n );\n });\n }\n\n /**\n * Updates the server local and remote brb values so that they match the current client desired state.\n *\n * @param {SendSlotManager} sendSlotManager\n * @returns {Promise}\n */\n private applyClientStateToServer(sendSlotManager: SendSlotManager) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: request to server in progress, we need to wait for it to complete`\n );\n\n return Promise.resolve();\n }\n\n const remoteBrbRequiresSync = this.state.client.enabled !== this.state.server.enabled;\n\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: remoteBrbRequiresSync: ${remoteBrbRequiresSync}`\n );\n\n if (!remoteBrbRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: client state already matching server state, nothing to do`\n );\n\n return Promise.resolve();\n }\n\n this.state.syncToServerInProgress = true;\n\n return this.sendLocalBrbStateToServer()\n .then(() => {\n this.state.syncToServerInProgress = false;\n\n // This is a workaround for the fact that the server does not send the brb state\n // in the locus update when a user joins from multiple devices but not all devices are requested brb.\n // In the future, this could be improved with a new brb locus update handler\n // https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-655626\n this.handleServerBrbUpdate(this.state.client.enabled);\n\n LoggerProxy.logger.info(\n `Meeting:brbState#applyClientStateToServer: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(sendSlotManager);\n })\n .catch((error) => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.warn(`Meeting:brbState#applyClientStateToServer: Error: ${error}`);\n\n return Promise.reject(error);\n });\n }\n\n /**\n * Send the local brb state to the server\n *\n * @returns {Promise}\n */\n private async sendLocalBrbStateToServer() {\n const {enabled} = this.state.client;\n\n if (!this.meeting.isMultistream) {\n const errorMessage = 'Meeting:brbState#sendLocalBrbStateToServer: Not a multistream meeting';\n const error = new Error(errorMessage);\n\n LoggerProxy.logger.error(error);\n\n return Promise.reject(error);\n }\n\n if (!this.meeting.mediaProperties.webrtcMediaConnection) {\n const errorMessage =\n 'Meeting:brbState#sendLocalBrbStateToServer: WebRTC media connection is not defined';\n const error = new Error(errorMessage);\n\n LoggerProxy.logger.error(error);\n\n return Promise.reject(error);\n }\n\n // this logic should be applied only to multistream meetings\n return this.meeting.meetingRequest\n .setBrb({\n enabled,\n locusUrl: this.meeting.locusUrl,\n deviceUrl: this.meeting.deviceUrl,\n selfId: this.meeting.selfId,\n })\n .catch((error) => {\n LoggerProxy.logger.error('Meeting:brbState#sendLocalBrbStateToServer: Error ', error);\n\n return Promise.reject(error);\n });\n }\n\n /**\n * This method should be called whenever the server brb state is changed\n *\n * @param {Boolean} [enabled] true if user has brb enabled, false otherwise\n * @returns {undefined}\n */\n public handleServerBrbUpdate(enabled?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:brbState#handleServerBrbUpdate: updating server brb to (${enabled})`\n );\n this.state.server.enabled = !!enabled;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAIO,IAAMG,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAIE,OAAgB,EAAEC,OAAgB,EAAK;EACpEC,oBAAW,CAACC,MAAM,CAACC,IAAI,sEAAAC,MAAA,CACgDL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEM,EAAE,CAClF,CAAC;EAED,IAAMC,QAAQ,GAAG,IAAIC,QAAQ,CAACR,OAAO,EAAEC,OAAO,CAAC;EAE/C,OAAOM,QAAQ;AACjB,CAAC;;AAED;AACA;AACA;AAFA,IAGaC,QAAQ,GAAAT,OAAA,CAAAS,QAAA;EAanB;AACF;AACA;AACA;AACA;AACA;EACE,SAAAA,SAAYR,OAAgB,EAAEC,OAAgB,EAAE;IAAA,IAAAQ,gBAAA,CAAAC,OAAA,QAAAF,QAAA;IAAA,IAAAG,gBAAA,CAAAD,OAAA;IAAA,IAAAC,gBAAA,CAAAD,OAAA;IAC9C,IAAI,CAACV,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACY,KAAK,GAAG;MACXC,MAAM,EAAE;QACNZ,OAAO,EAAPA;MACF,CAAC;MACDa,MAAM,EAAE;QACNb,OAAO,EAAE;MACX,CAAC;MACDc,sBAAsB,EAAE;IAC1B,CAAC;EACH;;EAEA;A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CAACC,MAAM,CAACC,IAAI,oEAAAC,MAAA,CAC8CJ,OAAO,MAC5E,CAAC;MACD,IAAI,CAACW,KAAK,CAACE,MAAM,CAACb,OAAO,GAAG,CAAC,CAACA,OAAO;IACvC;EAAC;EAAA,OAAAO,QAAA;AAAA"}
|
package/dist/meeting/index.js
CHANGED
@@ -3405,14 +3405,18 @@ 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
|
-
_this14
|
3408
|
+
var _this14$transcription;
|
3409
|
+
if ((_this14$transcription = _this14.transcription) !== null && _this14$transcription !== void 0 && _this14$transcription.languageOptions) {
|
3410
|
+
_this14.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
|
3411
|
+
}
|
3409
3412
|
// @ts-ignore
|
3410
|
-
_this14.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage);
|
3413
|
+
_this14.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage, _this14.id);
|
3411
3414
|
_triggerProxy.default.trigger(_this14, {
|
3412
3415
|
file: 'meeting/index',
|
3413
3416
|
function: 'setupLocusControlsListener'
|
3414
3417
|
}, _constants.EVENT_TRIGGERS.MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, {
|
3415
|
-
spokenLanguage: spokenLanguage
|
3418
|
+
spokenLanguage: spokenLanguage,
|
3419
|
+
meetingId: _this14.id
|
3416
3420
|
});
|
3417
3421
|
}
|
3418
3422
|
});
|
@@ -4345,17 +4349,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
4345
4349
|
}
|
4346
4350
|
|
4347
4351
|
/**
|
4348
|
-
* Cancel an SIP call invitation made during a meeting
|
4352
|
+
* Cancel an SIP/phone call invitation made during a meeting
|
4349
4353
|
* @param {Object} invitee
|
4350
4354
|
* @param {String} invitee.memberId
|
4351
|
-
* @
|
4355
|
+
* @param {Boolean} [invitee.isInternalNumber] - When cancel phone invitation, if the number is internal
|
4356
|
+
* @returns {Promise} see #members.cancelInviteByMemberId
|
4352
4357
|
* @public
|
4353
4358
|
* @memberof Meeting
|
4354
4359
|
*/
|
4355
4360
|
}, {
|
4356
|
-
key: "
|
4357
|
-
value: function
|
4358
|
-
return this.members.
|
4361
|
+
key: "cancelInviteByMemberId",
|
4362
|
+
value: function cancelInviteByMemberId(invitee) {
|
4363
|
+
return this.members.cancelInviteByMemberId(invitee);
|
4359
4364
|
}
|
4360
4365
|
|
4361
4366
|
/**
|
@@ -5378,13 +5383,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
5378
5383
|
|
5379
5384
|
// Only send restore event when it was disconnected before and for connected later
|
5380
5385
|
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
|
-
});
|
5388
5386
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
|
5389
5387
|
correlation_id: _this27.correlationId
|
5390
5388
|
});
|
@@ -5395,13 +5393,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
5395
5393
|
// @ts-ignore
|
5396
5394
|
this.webex.internal.mercury.on(_constants.OFFLINE, function () {
|
5397
5395
|
_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
|
-
});
|
5405
5396
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
|
5406
5397
|
correlation_id: _this27.correlationId
|
5407
5398
|
});
|
@@ -7641,6 +7632,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7641
7632
|
remoteMediaManagerConfig,
|
7642
7633
|
_options$bundlePolicy,
|
7643
7634
|
bundlePolicy,
|
7635
|
+
_options$additionalMe,
|
7636
|
+
additionalMediaOptions,
|
7637
|
+
rawSendVideo,
|
7638
|
+
rawReceiveVideo,
|
7639
|
+
rawSendAudio,
|
7640
|
+
rawReceiveAudio,
|
7641
|
+
sendVideo,
|
7642
|
+
receiveVideo,
|
7643
|
+
sendAudio,
|
7644
|
+
receiveAudio,
|
7644
7645
|
_this$remoteMediaMana,
|
7645
7646
|
_yield$this$mediaProp,
|
7646
7647
|
connectionType,
|
@@ -7697,17 +7698,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7697
7698
|
}
|
7698
7699
|
throw new _webexErrors.UserNotJoinedError();
|
7699
7700
|
case 10:
|
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;
|
7701
|
+
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;
|
7702
|
+
rawSendVideo = additionalMediaOptions.sendVideo, rawReceiveVideo = additionalMediaOptions.receiveVideo, rawSendAudio = additionalMediaOptions.sendAudio, rawReceiveAudio = additionalMediaOptions.receiveAudio;
|
7703
|
+
sendVideo = videoEnabled && (rawSendVideo !== null && rawSendVideo !== void 0 ? rawSendVideo : true);
|
7704
|
+
receiveVideo = videoEnabled && (rawReceiveVideo !== null && rawReceiveVideo !== void 0 ? rawReceiveVideo : true);
|
7705
|
+
sendAudio = audioEnabled && (rawSendAudio !== null && rawSendAudio !== void 0 ? rawSendAudio : true);
|
7706
|
+
receiveAudio = audioEnabled && (rawReceiveAudio !== null && rawReceiveAudio !== void 0 ? rawReceiveAudio : true);
|
7701
7707
|
this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
|
7702
7708
|
|
7703
7709
|
// If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
|
7704
7710
|
// @ts-ignore - isUserUnadmitted coming from SelfUtil
|
7705
7711
|
if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
|
7706
|
-
_context35.next =
|
7712
|
+
_context35.next = 19;
|
7707
7713
|
break;
|
7708
7714
|
}
|
7709
7715
|
throw new _webexErrors.UserInLobbyError();
|
7710
|
-
case
|
7716
|
+
case 19:
|
7711
7717
|
// @ts-ignore
|
7712
7718
|
this.webex.internal.newMetrics.submitClientEvent({
|
7713
7719
|
name: 'client.media.capabilities',
|
@@ -7737,67 +7743,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7737
7743
|
// when audioEnabled/videoEnabled is true, we set sendAudio/sendVideo to true even before any streams are published
|
7738
7744
|
// to avoid doing an extra SDP exchange when they are published for the first time
|
7739
7745
|
this.mediaProperties.setMediaDirection({
|
7740
|
-
sendAudio:
|
7741
|
-
sendVideo:
|
7746
|
+
sendAudio: sendAudio,
|
7747
|
+
sendVideo: sendVideo,
|
7742
7748
|
sendShare: false,
|
7743
|
-
receiveAudio:
|
7744
|
-
receiveVideo:
|
7749
|
+
receiveAudio: receiveAudio,
|
7750
|
+
receiveVideo: receiveVideo,
|
7745
7751
|
receiveShare: shareAudioEnabled || shareVideoEnabled
|
7746
7752
|
});
|
7747
7753
|
this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
|
7748
7754
|
this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
|
7749
7755
|
this.brbState = (0, _brbState.createBrbState)(this, false);
|
7750
|
-
_context35.prev =
|
7751
|
-
_context35.next =
|
7756
|
+
_context35.prev = 24;
|
7757
|
+
_context35.next = 27;
|
7752
7758
|
return this.setUpLocalStreamReferences(localStreams);
|
7753
|
-
case
|
7759
|
+
case 27:
|
7754
7760
|
this.setMercuryListener();
|
7755
7761
|
this.createStatsAnalyzer();
|
7756
|
-
_context35.prev =
|
7757
|
-
_context35.next =
|
7762
|
+
_context35.prev = 29;
|
7763
|
+
_context35.next = 32;
|
7758
7764
|
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
|
7759
|
-
case
|
7760
|
-
_context35.next =
|
7765
|
+
case 32:
|
7766
|
+
_context35.next = 45;
|
7761
7767
|
break;
|
7762
|
-
case
|
7763
|
-
_context35.prev =
|
7764
|
-
_context35.t0 = _context35["catch"](
|
7768
|
+
case 34:
|
7769
|
+
_context35.prev = 34;
|
7770
|
+
_context35.t0 = _context35["catch"](29);
|
7765
7771
|
if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
|
7766
|
-
_context35.next =
|
7772
|
+
_context35.next = 44;
|
7767
7773
|
break;
|
7768
7774
|
}
|
7769
7775
|
_loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
|
7770
|
-
_context35.next =
|
7776
|
+
_context35.next = 40;
|
7771
7777
|
return this.downgradeFromMultistreamToTranscoded();
|
7772
|
-
case
|
7773
|
-
_context35.next =
|
7778
|
+
case 40:
|
7779
|
+
_context35.next = 42;
|
7774
7780
|
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
|
7775
|
-
case
|
7776
|
-
_context35.next =
|
7781
|
+
case 42:
|
7782
|
+
_context35.next = 45;
|
7777
7783
|
break;
|
7778
|
-
case
|
7784
|
+
case 44:
|
7779
7785
|
throw _context35.t0;
|
7780
|
-
case
|
7786
|
+
case 45:
|
7781
7787
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
|
7782
7788
|
if (!this.mediaProperties.hasLocalShareStream()) {
|
7783
|
-
_context35.next =
|
7789
|
+
_context35.next = 49;
|
7784
7790
|
break;
|
7785
7791
|
}
|
7786
|
-
_context35.next =
|
7792
|
+
_context35.next = 49;
|
7787
7793
|
return this.enqueueScreenShareFloorRequest();
|
7788
|
-
case
|
7789
|
-
_context35.next =
|
7794
|
+
case 49:
|
7795
|
+
_context35.next = 51;
|
7790
7796
|
return this.mediaProperties.getCurrentConnectionInfo();
|
7791
|
-
case
|
7797
|
+
case 51:
|
7792
7798
|
_yield$this$mediaProp = _context35.sent;
|
7793
7799
|
connectionType = _yield$this$mediaProp.connectionType;
|
7794
7800
|
ipVersion = _yield$this$mediaProp.ipVersion;
|
7795
7801
|
selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
|
7796
7802
|
numTransports = _yield$this$mediaProp.numTransports;
|
7797
7803
|
iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
|
7798
|
-
_context35.next =
|
7804
|
+
_context35.next = 59;
|
7799
7805
|
return this.getMediaReachabilityMetricFields();
|
7800
|
-
case
|
7806
|
+
case 59:
|
7801
7807
|
reachabilityMetrics = _context35.sent;
|
7802
7808
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
|
7803
7809
|
correlation_id: this.correlationId,
|
@@ -7827,21 +7833,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7827
7833
|
// We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
|
7828
7834
|
(_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
|
7829
7835
|
this.startPeriodicLogUpload();
|
7830
|
-
_context35.next =
|
7836
|
+
_context35.next = 85;
|
7831
7837
|
break;
|
7832
|
-
case
|
7833
|
-
_context35.prev =
|
7834
|
-
_context35.t1 = _context35["catch"](
|
7838
|
+
case 67:
|
7839
|
+
_context35.prev = 67;
|
7840
|
+
_context35.t1 = _context35["catch"](24);
|
7835
7841
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
|
7836
7842
|
|
7837
7843
|
// @ts-ignore
|
7838
|
-
_context35.next =
|
7844
|
+
_context35.next = 72;
|
7839
7845
|
return this.getMediaReachabilityMetricFields();
|
7840
|
-
case
|
7846
|
+
case 72:
|
7841
7847
|
_reachabilityMetrics = _context35.sent;
|
7842
|
-
_context35.next =
|
7848
|
+
_context35.next = 75;
|
7843
7849
|
return this.mediaProperties.getCurrentConnectionInfo();
|
7844
|
-
case
|
7850
|
+
case 75:
|
7845
7851
|
_yield$this$mediaProp2 = _context35.sent;
|
7846
7852
|
_selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
|
7847
7853
|
_numTransports = _yield$this$mediaProp2.numTransports;
|
@@ -7865,9 +7871,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7865
7871
|
}, _reachabilityMetrics), _iceCandidateErrors), {}, {
|
7866
7872
|
iceCandidatesCount: this.iceCandidatesCount
|
7867
7873
|
}));
|
7868
|
-
_context35.next =
|
7874
|
+
_context35.next = 82;
|
7869
7875
|
return this.cleanUpOnAddMediaFailure();
|
7870
|
-
case
|
7876
|
+
case 82:
|
7871
7877
|
// Upload logs on error while adding media
|
7872
7878
|
_triggerProxy.default.trigger(this, {
|
7873
7879
|
file: 'meeting/index',
|
@@ -7879,15 +7885,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
7879
7885
|
});
|
7880
7886
|
}
|
7881
7887
|
throw _context35.t1;
|
7882
|
-
case
|
7883
|
-
_context35.prev =
|
7888
|
+
case 85:
|
7889
|
+
_context35.prev = 85;
|
7884
7890
|
this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
|
7885
|
-
return _context35.finish(
|
7886
|
-
case
|
7891
|
+
return _context35.finish(85);
|
7892
|
+
case 88:
|
7887
7893
|
case "end":
|
7888
7894
|
return _context35.stop();
|
7889
7895
|
}
|
7890
|
-
}, _callee35, this, [[
|
7896
|
+
}, _callee35, this, [[24, 67, 85, 88], [29, 34]]);
|
7891
7897
|
}));
|
7892
7898
|
function addMediaInternal(_x33, _x34, _x35) {
|
7893
7899
|
return _addMediaInternal.apply(this, arguments);
|
@@ -9436,7 +9442,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
9436
9442
|
key: "getMediaReachabilityMetricFields",
|
9437
9443
|
value: (function () {
|
9438
9444
|
var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
|
9439
|
-
var
|
9445
|
+
var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
|
9446
|
+
var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
|
9440
9447
|
return _regenerator.default.wrap(function _callee42$(_context42) {
|
9441
9448
|
while (1) switch (_context42.prev = _context42.next) {
|
9442
9449
|
case 0:
|
@@ -9452,18 +9459,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
9452
9459
|
}
|
9453
9460
|
return total;
|
9454
9461
|
}, 0);
|
9462
|
+
selectedSubnetFirstOctet = (_this$mediaServerIp = this.mediaServerIp) === null || _this$mediaServerIp === void 0 ? void 0 : _this$mediaServerIp.split('.')[0];
|
9455
9463
|
isSubnetReachable = null;
|
9456
|
-
if (totalSuccessCases > 0) {
|
9464
|
+
if (totalSuccessCases > 0 && selectedSubnetFirstOctet) {
|
9465
|
+
isSubnetReachable =
|
9457
9466
|
// @ts-ignore
|
9458
|
-
|
9459
|
-
}
|
9460
|
-
selectedCluster = null;
|
9461
|
-
if (this.mediaConnections && this.mediaConnections.length > 0) {
|
9462
|
-
selectedCluster = this.mediaConnections[0].mediaAgentCluster;
|
9467
|
+
this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
|
9463
9468
|
}
|
9469
|
+
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;
|
9464
9470
|
return _context42.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
|
9465
|
-
|
9466
|
-
|
9471
|
+
subnet_reachable: isSubnetReachable,
|
9472
|
+
selected_cluster: selectedCluster,
|
9473
|
+
selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
|
9467
9474
|
}));
|
9468
9475
|
case 10:
|
9469
9476
|
case "end":
|