@webex/plugin-meetings 3.0.0-beta.25 → 3.0.0-beta.26
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/constants.js +5 -1
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +15 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +203 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/util.js +28 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/meeting/in-meeting-actions.js +8 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +59 -12
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +5 -0
- package/dist/types/controls-options-manager/index.d.ts +120 -0
- package/dist/types/controls-options-manager/util.d.ts +7 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
- package/dist/types/meeting/index.d.ts +18 -0
- package/package.json +18 -18
- package/src/constants.ts +4 -0
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +6 -0
- package/src/controls-options-manager/index.ts +183 -0
- package/src/controls-options-manager/util.ts +20 -0
- package/src/meeting/in-meeting-actions.ts +16 -0
- package/src/meeting/index.ts +49 -0
- package/test/unit/spec/controls-options-manager/index.js +124 -0
- package/test/unit/spec/controls-options-manager/util.js +66 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +8 -0
- package/test/unit/spec/meeting/index.js +15 -0
|
@@ -595,6 +595,10 @@ export declare const DISPLAY_HINTS: {
|
|
|
595
595
|
DISABLE_REACTIONS: string;
|
|
596
596
|
REACTIONS_ACTIVE: string;
|
|
597
597
|
REACTIONS_INACTIVE: string;
|
|
598
|
+
ENABLE_MUTE_ON_ENTRY: string;
|
|
599
|
+
DISABLE_MUTE_ON_ENTRY: string;
|
|
600
|
+
ENABLE_HARD_MUTE: string;
|
|
601
|
+
DISABLE_HARD_MUTE: string;
|
|
598
602
|
};
|
|
599
603
|
export declare const SELF_ROLES: {
|
|
600
604
|
COHOST: string;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import MeetingRequest from '../meeting/request';
|
|
2
|
+
/**
|
|
3
|
+
* docs
|
|
4
|
+
* https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html
|
|
5
|
+
* https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry
|
|
6
|
+
* https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting
|
|
7
|
+
* https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867
|
|
8
|
+
* https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @description ControlsOptionsManager is responsible for handling the behavior of participant controls when somebody joins a meeting
|
|
12
|
+
* @export
|
|
13
|
+
* @private
|
|
14
|
+
* @class Recording
|
|
15
|
+
*/
|
|
16
|
+
export default class ControlsOptionsManager {
|
|
17
|
+
/**
|
|
18
|
+
* @instance
|
|
19
|
+
* @type {MeetingRequest}
|
|
20
|
+
* @private
|
|
21
|
+
* @memberof ControlsOptionsManager
|
|
22
|
+
*/
|
|
23
|
+
private request;
|
|
24
|
+
/**
|
|
25
|
+
* @instance
|
|
26
|
+
* @type {Array}
|
|
27
|
+
* @private
|
|
28
|
+
* @memberof ControlsOptionsManager
|
|
29
|
+
*/
|
|
30
|
+
private displayHints;
|
|
31
|
+
/**
|
|
32
|
+
* @instance
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @private
|
|
35
|
+
* @memberof ControlsOptionsManager
|
|
36
|
+
*/
|
|
37
|
+
private locusUrl;
|
|
38
|
+
/**
|
|
39
|
+
* @param {MeetingRequest} request
|
|
40
|
+
* @param {Object} options
|
|
41
|
+
* @constructor
|
|
42
|
+
* @memberof ControlsOptionsManager
|
|
43
|
+
*/
|
|
44
|
+
constructor(request: MeetingRequest, options?: {
|
|
45
|
+
locusUrl: string;
|
|
46
|
+
displayHints?: Array<string>;
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* @param {MeetingRequest} request
|
|
50
|
+
* @returns {void}
|
|
51
|
+
* @private
|
|
52
|
+
* @memberof ControlsOptionsManager
|
|
53
|
+
*/
|
|
54
|
+
private initialize;
|
|
55
|
+
/**
|
|
56
|
+
* @param {Object} options
|
|
57
|
+
* @returns {void}
|
|
58
|
+
* @public
|
|
59
|
+
* @memberof ControlsOptionsManager
|
|
60
|
+
*/
|
|
61
|
+
set(options?: {
|
|
62
|
+
locusUrl: string;
|
|
63
|
+
displayHints?: Array<string>;
|
|
64
|
+
}): void;
|
|
65
|
+
/**
|
|
66
|
+
* @param {string} url
|
|
67
|
+
* @returns {void}
|
|
68
|
+
* @public
|
|
69
|
+
* @memberof ControlsOptionsManager
|
|
70
|
+
*/
|
|
71
|
+
setLocusUrl(url: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* @param {Array} hints
|
|
74
|
+
* @returns {void}
|
|
75
|
+
* @public
|
|
76
|
+
* @memberof ControlsOptionsManager
|
|
77
|
+
*/
|
|
78
|
+
setDisplayHints(hints: Array<string>): void;
|
|
79
|
+
/**
|
|
80
|
+
* @returns {string}
|
|
81
|
+
* @public
|
|
82
|
+
* @memberof ControlsOptionsManager
|
|
83
|
+
*/
|
|
84
|
+
getLocusUrl(): string;
|
|
85
|
+
/**
|
|
86
|
+
* @returns {Array}
|
|
87
|
+
* @public
|
|
88
|
+
* @memberof ControlsOptionsManager
|
|
89
|
+
*/
|
|
90
|
+
getDisplayHints(): string[];
|
|
91
|
+
/**
|
|
92
|
+
* @param {Object} options
|
|
93
|
+
* @returns {void}
|
|
94
|
+
* @private
|
|
95
|
+
* @memberof ControlsOptionsManager
|
|
96
|
+
*/
|
|
97
|
+
private extract;
|
|
98
|
+
/**
|
|
99
|
+
* @param {Setting} setting
|
|
100
|
+
* @param {boolean} enabled
|
|
101
|
+
* @private
|
|
102
|
+
* @memberof ControlsOptionsManager
|
|
103
|
+
* @returns {Promise}
|
|
104
|
+
*/
|
|
105
|
+
private setControls;
|
|
106
|
+
/**
|
|
107
|
+
* @public
|
|
108
|
+
* @param {boolean} enabled
|
|
109
|
+
* @memberof ControlsOptionsManager
|
|
110
|
+
* @returns {Promise}
|
|
111
|
+
*/
|
|
112
|
+
setMuteOnEntry(enabled: boolean): Promise<any>;
|
|
113
|
+
/**
|
|
114
|
+
* @public
|
|
115
|
+
* @param {boolean} enabled
|
|
116
|
+
* @memberof ControlsOptionsManager
|
|
117
|
+
* @returns {Promise}
|
|
118
|
+
*/
|
|
119
|
+
setDisallowUnmute(enabled: boolean): Promise<any>;
|
|
120
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
canSetMuteOnEntry: (displayHints: string[]) => boolean;
|
|
3
|
+
canSetDisallowUnmute: (displayHints: string[]) => boolean;
|
|
4
|
+
canUnsetMuteOnEntry: (displayHints: string[]) => boolean;
|
|
5
|
+
canUnsetDisallowUnmute: (displayHints: string[]) => boolean;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -10,6 +10,10 @@ interface IInMeetingActions {
|
|
|
10
10
|
canAdmitParticipant?: boolean;
|
|
11
11
|
canLock?: boolean;
|
|
12
12
|
canUnlock?: boolean;
|
|
13
|
+
canSetMuteOnEntry?: boolean;
|
|
14
|
+
canUnsetMuteOnEntry?: boolean;
|
|
15
|
+
canSetDisallowUnmute?: boolean;
|
|
16
|
+
canUnsetDisallowUnmute?: boolean;
|
|
13
17
|
canAssignHost?: boolean;
|
|
14
18
|
canStartRecording?: boolean;
|
|
15
19
|
canPauseRecording?: boolean;
|
|
@@ -45,6 +49,10 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
45
49
|
canPauseRecording: any;
|
|
46
50
|
canResumeRecording: any;
|
|
47
51
|
canStopRecording: any;
|
|
52
|
+
canSetMuteOnEntry: any;
|
|
53
|
+
canUnsetMuteOnEntry: any;
|
|
54
|
+
canSetDisallowUnmute: any;
|
|
55
|
+
canUnsetDisallowUnmute: any;
|
|
48
56
|
canRaiseHand: any;
|
|
49
57
|
canLowerAllHands: any;
|
|
50
58
|
canLowerSomeoneElsesHand: any;
|
|
@@ -14,6 +14,7 @@ import { RemoteMediaManager } from '../multistream/remoteMediaManager';
|
|
|
14
14
|
import { ReactionServerType, SkinToneType } from '../reactions/reactions.type';
|
|
15
15
|
import InMeetingActions from './in-meeting-actions';
|
|
16
16
|
import RecordingController from '../recording-controller';
|
|
17
|
+
import ControlsOptionsManager from '../controls-options-manager';
|
|
17
18
|
export declare const MEDIA_UPDATE_TYPE: {
|
|
18
19
|
ALL: string;
|
|
19
20
|
AUDIO: string;
|
|
@@ -345,6 +346,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
345
346
|
recording: any;
|
|
346
347
|
remoteMediaManager: RemoteMediaManager | null;
|
|
347
348
|
recordingController: RecordingController;
|
|
349
|
+
controlsOptionsManager: ControlsOptionsManager;
|
|
348
350
|
requiredCaptcha: any;
|
|
349
351
|
receiveSlotManager: ReceiveSlotManager;
|
|
350
352
|
shareStatus: string;
|
|
@@ -1378,6 +1380,22 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1378
1380
|
* @memberof Meeting
|
|
1379
1381
|
*/
|
|
1380
1382
|
startRecording(): Promise<any>;
|
|
1383
|
+
/**
|
|
1384
|
+
* set the mute on entry flag for participants if you're the host
|
|
1385
|
+
* @returns {Promise}
|
|
1386
|
+
* @param {boolean} enabled
|
|
1387
|
+
* @public
|
|
1388
|
+
* @memberof Meeting
|
|
1389
|
+
*/
|
|
1390
|
+
setMuteOnEntry(enabled: boolean): Promise<any>;
|
|
1391
|
+
/**
|
|
1392
|
+
* set the disallow unmute flag for participants if you're the host
|
|
1393
|
+
* @returns {Promise}
|
|
1394
|
+
* @param {boolean} enabled
|
|
1395
|
+
* @public
|
|
1396
|
+
* @memberof Meeting
|
|
1397
|
+
*/
|
|
1398
|
+
setDisallowUnmute(enabled: boolean): Promise<any>;
|
|
1381
1399
|
/**
|
|
1382
1400
|
* End the recording of this meeting
|
|
1383
1401
|
* @returns {Promise}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
36
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
35
|
+
"@webex/plugin-meetings": "3.0.0-beta.26",
|
|
36
|
+
"@webex/test-helper-chai": "3.0.0-beta.26",
|
|
37
|
+
"@webex/test-helper-mocha": "3.0.0-beta.26",
|
|
38
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.26",
|
|
39
|
+
"@webex/test-helper-retry": "3.0.0-beta.26",
|
|
40
|
+
"@webex/test-helper-test-users": "3.0.0-beta.26",
|
|
41
41
|
"chai": "^4.3.4",
|
|
42
42
|
"chai-as-promised": "^7.1.1",
|
|
43
43
|
"jsdom-global": "3.0.2",
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"typed-emitter": "^2.1.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@webex/common": "3.0.0-beta.
|
|
48
|
+
"@webex/common": "3.0.0-beta.26",
|
|
49
49
|
"@webex/internal-media-core": "1.33.2",
|
|
50
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
51
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
57
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
58
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
59
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
50
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.26",
|
|
51
|
+
"@webex/internal-plugin-device": "3.0.0-beta.26",
|
|
52
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.26",
|
|
53
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.26",
|
|
54
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.26",
|
|
55
|
+
"@webex/internal-plugin-support": "3.0.0-beta.26",
|
|
56
|
+
"@webex/internal-plugin-user": "3.0.0-beta.26",
|
|
57
|
+
"@webex/plugin-people": "3.0.0-beta.26",
|
|
58
|
+
"@webex/plugin-rooms": "3.0.0-beta.26",
|
|
59
|
+
"@webex/webex-core": "3.0.0-beta.26",
|
|
60
60
|
"ampersand-collection": "^2.0.2",
|
|
61
61
|
"bowser": "^2.11.0",
|
|
62
62
|
"btoa": "^1.2.1",
|
package/src/constants.ts
CHANGED
|
@@ -761,6 +761,10 @@ export const DISPLAY_HINTS = {
|
|
|
761
761
|
DISABLE_REACTIONS: 'DISABLE_REACTIONS',
|
|
762
762
|
REACTIONS_ACTIVE: 'REACTIONS_ACTIVE',
|
|
763
763
|
REACTIONS_INACTIVE: 'REACTIONS_INACTIVE',
|
|
764
|
+
ENABLE_MUTE_ON_ENTRY: 'ENABLE_MUTE_ON_ENTRY',
|
|
765
|
+
DISABLE_MUTE_ON_ENTRY: 'DISABLE_MUTE_ON_ENTRY',
|
|
766
|
+
ENABLE_HARD_MUTE: 'ENABLE_HARD_MUTE',
|
|
767
|
+
DISABLE_HARD_MUTE: 'DISABLE_HARD_MUTE',
|
|
764
768
|
};
|
|
765
769
|
|
|
766
770
|
export const SELF_ROLES = {
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import {camelCase} from 'lodash';
|
|
2
|
+
import PermissionError from '../common/errors/permission';
|
|
3
|
+
import {CONTROLS, HTTP_VERBS} from '../constants';
|
|
4
|
+
import MeetingRequest from '../meeting/request';
|
|
5
|
+
import LoggerProxy from '../common/logs/logger-proxy';
|
|
6
|
+
import Setting from './enums';
|
|
7
|
+
import Util from './util';
|
|
8
|
+
import {CAN_SET, CAN_UNSET, ENABLED} from './constants';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* docs
|
|
12
|
+
* https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html
|
|
13
|
+
* https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry
|
|
14
|
+
* https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting
|
|
15
|
+
* https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867
|
|
16
|
+
* https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description ControlsOptionsManager is responsible for handling the behavior of participant controls when somebody joins a meeting
|
|
21
|
+
* @export
|
|
22
|
+
* @private
|
|
23
|
+
* @class Recording
|
|
24
|
+
*/
|
|
25
|
+
export default class ControlsOptionsManager {
|
|
26
|
+
/**
|
|
27
|
+
* @instance
|
|
28
|
+
* @type {MeetingRequest}
|
|
29
|
+
* @private
|
|
30
|
+
* @memberof ControlsOptionsManager
|
|
31
|
+
*/
|
|
32
|
+
private request: MeetingRequest;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @instance
|
|
36
|
+
* @type {Array}
|
|
37
|
+
* @private
|
|
38
|
+
* @memberof ControlsOptionsManager
|
|
39
|
+
*/
|
|
40
|
+
private displayHints: Array<string> = [];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @instance
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @private
|
|
46
|
+
* @memberof ControlsOptionsManager
|
|
47
|
+
*/
|
|
48
|
+
private locusUrl: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param {MeetingRequest} request
|
|
52
|
+
* @param {Object} options
|
|
53
|
+
* @constructor
|
|
54
|
+
* @memberof ControlsOptionsManager
|
|
55
|
+
*/
|
|
56
|
+
constructor(
|
|
57
|
+
request: MeetingRequest,
|
|
58
|
+
options?: {
|
|
59
|
+
locusUrl: string;
|
|
60
|
+
displayHints?: Array<string>;
|
|
61
|
+
}
|
|
62
|
+
) {
|
|
63
|
+
this.initialize(request);
|
|
64
|
+
this.set(options);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @param {MeetingRequest} request
|
|
69
|
+
* @returns {void}
|
|
70
|
+
* @private
|
|
71
|
+
* @memberof ControlsOptionsManager
|
|
72
|
+
*/
|
|
73
|
+
private initialize(request: MeetingRequest) {
|
|
74
|
+
this.request = request;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @param {Object} options
|
|
79
|
+
* @returns {void}
|
|
80
|
+
* @public
|
|
81
|
+
* @memberof ControlsOptionsManager
|
|
82
|
+
*/
|
|
83
|
+
public set(options?: {locusUrl: string; displayHints?: Array<string>}) {
|
|
84
|
+
this.extract(options);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @param {string} url
|
|
89
|
+
* @returns {void}
|
|
90
|
+
* @public
|
|
91
|
+
* @memberof ControlsOptionsManager
|
|
92
|
+
*/
|
|
93
|
+
public setLocusUrl(url: string) {
|
|
94
|
+
this.locusUrl = url;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @param {Array} hints
|
|
99
|
+
* @returns {void}
|
|
100
|
+
* @public
|
|
101
|
+
* @memberof ControlsOptionsManager
|
|
102
|
+
*/
|
|
103
|
+
public setDisplayHints(hints: Array<string>) {
|
|
104
|
+
this.displayHints = hints;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @returns {string}
|
|
109
|
+
* @public
|
|
110
|
+
* @memberof ControlsOptionsManager
|
|
111
|
+
*/
|
|
112
|
+
public getLocusUrl() {
|
|
113
|
+
return this.locusUrl;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @returns {Array}
|
|
118
|
+
* @public
|
|
119
|
+
* @memberof ControlsOptionsManager
|
|
120
|
+
*/
|
|
121
|
+
public getDisplayHints() {
|
|
122
|
+
return this.displayHints;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @param {Object} options
|
|
127
|
+
* @returns {void}
|
|
128
|
+
* @private
|
|
129
|
+
* @memberof ControlsOptionsManager
|
|
130
|
+
*/
|
|
131
|
+
private extract(options?: {locusUrl: string; displayHints?: Array<string>}) {
|
|
132
|
+
this.setDisplayHints(options?.displayHints);
|
|
133
|
+
this.setLocusUrl(options?.locusUrl);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @param {Setting} setting
|
|
138
|
+
* @param {boolean} enabled
|
|
139
|
+
* @private
|
|
140
|
+
* @memberof ControlsOptionsManager
|
|
141
|
+
* @returns {Promise}
|
|
142
|
+
*/
|
|
143
|
+
private setControls(setting: Setting, enabled: boolean): Promise<any> {
|
|
144
|
+
LoggerProxy.logger.log(`ControlsOptionsManager:index#setControls --> ${setting} [${enabled}]`);
|
|
145
|
+
|
|
146
|
+
if (Util?.[`${enabled ? CAN_SET : CAN_UNSET}${setting}`](this.displayHints)) {
|
|
147
|
+
// @ts-ignore
|
|
148
|
+
return this.request.request({
|
|
149
|
+
uri: `${this.locusUrl}/${CONTROLS}`,
|
|
150
|
+
body: {
|
|
151
|
+
[camelCase(setting)]: {
|
|
152
|
+
[ENABLED]: enabled,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
method: HTTP_VERBS.PATCH,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return Promise.reject(
|
|
160
|
+
new PermissionError(`${setting} [${enabled}] not allowed, due to moderator property.`)
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @public
|
|
166
|
+
* @param {boolean} enabled
|
|
167
|
+
* @memberof ControlsOptionsManager
|
|
168
|
+
* @returns {Promise}
|
|
169
|
+
*/
|
|
170
|
+
public setMuteOnEntry(enabled: boolean): Promise<any> {
|
|
171
|
+
return this.setControls(Setting.muteOnEntry, enabled);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @public
|
|
176
|
+
* @param {boolean} enabled
|
|
177
|
+
* @memberof ControlsOptionsManager
|
|
178
|
+
* @returns {Promise}
|
|
179
|
+
*/
|
|
180
|
+
public setDisallowUnmute(enabled: boolean): Promise<any> {
|
|
181
|
+
return this.setControls(Setting.disallowUnmute, enabled);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {DISPLAY_HINTS} from '../constants';
|
|
2
|
+
|
|
3
|
+
const canSetMuteOnEntry = (displayHints: Array<string>): boolean =>
|
|
4
|
+
displayHints.includes(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);
|
|
5
|
+
|
|
6
|
+
const canSetDisallowUnmute = (displayHints: Array<string>): boolean =>
|
|
7
|
+
displayHints.includes(DISPLAY_HINTS.ENABLE_HARD_MUTE);
|
|
8
|
+
|
|
9
|
+
const canUnsetMuteOnEntry = (displayHints: Array<string>): boolean =>
|
|
10
|
+
displayHints.includes(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);
|
|
11
|
+
|
|
12
|
+
const canUnsetDisallowUnmute = (displayHints: Array<string>): boolean =>
|
|
13
|
+
displayHints.includes(DISPLAY_HINTS.DISABLE_HARD_MUTE);
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
canSetMuteOnEntry,
|
|
17
|
+
canSetDisallowUnmute,
|
|
18
|
+
canUnsetMuteOnEntry,
|
|
19
|
+
canUnsetDisallowUnmute,
|
|
20
|
+
};
|
|
@@ -13,6 +13,10 @@ interface IInMeetingActions {
|
|
|
13
13
|
canAdmitParticipant?: boolean;
|
|
14
14
|
canLock?: boolean;
|
|
15
15
|
canUnlock?: boolean;
|
|
16
|
+
canSetMuteOnEntry?: boolean;
|
|
17
|
+
canUnsetMuteOnEntry?: boolean;
|
|
18
|
+
canSetDisallowUnmute?: boolean;
|
|
19
|
+
canUnsetDisallowUnmute?: boolean;
|
|
16
20
|
canAssignHost?: boolean;
|
|
17
21
|
canStartRecording?: boolean;
|
|
18
22
|
canPauseRecording?: boolean;
|
|
@@ -59,6 +63,14 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
59
63
|
|
|
60
64
|
canStopRecording = null;
|
|
61
65
|
|
|
66
|
+
canSetMuteOnEntry = null;
|
|
67
|
+
|
|
68
|
+
canUnsetMuteOnEntry = null;
|
|
69
|
+
|
|
70
|
+
canSetDisallowUnmute = null;
|
|
71
|
+
|
|
72
|
+
canUnsetDisallowUnmute = null;
|
|
73
|
+
|
|
62
74
|
canRaiseHand = null;
|
|
63
75
|
|
|
64
76
|
canLowerAllHands = null;
|
|
@@ -99,6 +111,10 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
99
111
|
canLock: this.canLock,
|
|
100
112
|
canUnlock: this.canUnlock,
|
|
101
113
|
canAssignHost: this.canAssignHost,
|
|
114
|
+
canSetMuteOnEntry: this.canSetMuteOnEntry,
|
|
115
|
+
canUnsetMuteOnEntry: this.canUnsetMuteOnEntry,
|
|
116
|
+
canSetDisallowUnmute: this.canSetDisallowUnmute,
|
|
117
|
+
canUnsetDisallowUnmute: this.canUnsetDisallowUnmute,
|
|
102
118
|
canStartRecording: this.canStartRecording,
|
|
103
119
|
canPauseRecording: this.canPauseRecording,
|
|
104
120
|
canResumeRecording: this.canResumeRecording,
|
package/src/meeting/index.ts
CHANGED
|
@@ -37,6 +37,7 @@ import MeetingRequest from './request';
|
|
|
37
37
|
import Members from '../members/index';
|
|
38
38
|
import MeetingUtil from './util';
|
|
39
39
|
import RecordingUtil from '../recording-controller/util';
|
|
40
|
+
import ControlsOptionsUtil from '../controls-options-manager/util';
|
|
40
41
|
import MediaUtil from '../media/util';
|
|
41
42
|
import Transcription from '../transcription';
|
|
42
43
|
import {Reactions, SkinTones} from '../reactions/reactions';
|
|
@@ -106,6 +107,7 @@ import Breakouts from '../breakouts';
|
|
|
106
107
|
import InMeetingActions from './in-meeting-actions';
|
|
107
108
|
import {REACTION_RELAY_TYPES} from '../reactions/constants';
|
|
108
109
|
import RecordingController from '../recording-controller';
|
|
110
|
+
import ControlsOptionsManager from '../controls-options-manager';
|
|
109
111
|
|
|
110
112
|
const {isBrowser} = BrowserDetection();
|
|
111
113
|
|
|
@@ -485,6 +487,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
485
487
|
recording: any;
|
|
486
488
|
remoteMediaManager: RemoteMediaManager | null;
|
|
487
489
|
recordingController: RecordingController;
|
|
490
|
+
controlsOptionsManager: ControlsOptionsManager;
|
|
488
491
|
requiredCaptcha: any;
|
|
489
492
|
receiveSlotManager: ReceiveSlotManager;
|
|
490
493
|
shareStatus: string;
|
|
@@ -1098,6 +1101,18 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1098
1101
|
displayHints: [],
|
|
1099
1102
|
});
|
|
1100
1103
|
|
|
1104
|
+
/**
|
|
1105
|
+
* The class that helps to control recording functions: start, stop, pause, resume, etc
|
|
1106
|
+
* @instance
|
|
1107
|
+
* @type {ControlsOptionsManager}
|
|
1108
|
+
* @public
|
|
1109
|
+
* @memberof Meeting
|
|
1110
|
+
*/
|
|
1111
|
+
this.controlsOptionsManager = new ControlsOptionsManager(this.meetingRequest, {
|
|
1112
|
+
locusUrl: this.locusInfo?.url,
|
|
1113
|
+
displayHints: [],
|
|
1114
|
+
});
|
|
1115
|
+
|
|
1101
1116
|
this.setUpLocusInfoListeners();
|
|
1102
1117
|
this.locusInfo.init(attrs.locus ? attrs.locus : {});
|
|
1103
1118
|
this.hasJoinedOnce = false;
|
|
@@ -2187,6 +2202,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
2187
2202
|
this.locusUrl = payload;
|
|
2188
2203
|
this.locusId = this.locusUrl?.split('/').pop();
|
|
2189
2204
|
this.recordingController.setLocusUrl(this.locusUrl);
|
|
2205
|
+
this.controlsOptionsManager.setLocusUrl(this.locusUrl);
|
|
2190
2206
|
});
|
|
2191
2207
|
}
|
|
2192
2208
|
|
|
@@ -2252,6 +2268,16 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
2252
2268
|
canAdmitParticipant: MeetingUtil.canAdmitParticipant(payload.info.userDisplayHints),
|
|
2253
2269
|
canLock: MeetingUtil.canUserLock(payload.info.userDisplayHints),
|
|
2254
2270
|
canUnlock: MeetingUtil.canUserUnlock(payload.info.userDisplayHints),
|
|
2271
|
+
canSetDisallowUnmute: ControlsOptionsUtil.canSetDisallowUnmute(
|
|
2272
|
+
payload.info.userDisplayHints
|
|
2273
|
+
),
|
|
2274
|
+
canUnsetDisallowUnmute: ControlsOptionsUtil.canUnsetDisallowUnmute(
|
|
2275
|
+
payload.info.userDisplayHints
|
|
2276
|
+
),
|
|
2277
|
+
canSetMuteOnEntry: ControlsOptionsUtil.canSetMuteOnEntry(payload.info.userDisplayHints),
|
|
2278
|
+
canUnsetMuteOnEntry: ControlsOptionsUtil.canUnsetMuteOnEntry(
|
|
2279
|
+
payload.info.userDisplayHints
|
|
2280
|
+
),
|
|
2255
2281
|
canStartRecording: RecordingUtil.canUserStart(payload.info.userDisplayHints),
|
|
2256
2282
|
canStopRecording: RecordingUtil.canUserStop(payload.info.userDisplayHints),
|
|
2257
2283
|
canPauseRecording: RecordingUtil.canUserPause(payload.info.userDisplayHints),
|
|
@@ -2288,6 +2314,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
2288
2314
|
});
|
|
2289
2315
|
|
|
2290
2316
|
this.recordingController.setDisplayHints(payload.info.userDisplayHints);
|
|
2317
|
+
this.controlsOptionsManager.setDisplayHints(payload.info.userDisplayHints);
|
|
2291
2318
|
|
|
2292
2319
|
if (changed) {
|
|
2293
2320
|
Trigger.trigger(
|
|
@@ -6131,6 +6158,28 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
6131
6158
|
return this.recordingController.startRecording();
|
|
6132
6159
|
}
|
|
6133
6160
|
|
|
6161
|
+
/**
|
|
6162
|
+
* set the mute on entry flag for participants if you're the host
|
|
6163
|
+
* @returns {Promise}
|
|
6164
|
+
* @param {boolean} enabled
|
|
6165
|
+
* @public
|
|
6166
|
+
* @memberof Meeting
|
|
6167
|
+
*/
|
|
6168
|
+
public setMuteOnEntry(enabled: boolean) {
|
|
6169
|
+
return this.controlsOptionsManager.setMuteOnEntry(enabled);
|
|
6170
|
+
}
|
|
6171
|
+
|
|
6172
|
+
/**
|
|
6173
|
+
* set the disallow unmute flag for participants if you're the host
|
|
6174
|
+
* @returns {Promise}
|
|
6175
|
+
* @param {boolean} enabled
|
|
6176
|
+
* @public
|
|
6177
|
+
* @memberof Meeting
|
|
6178
|
+
*/
|
|
6179
|
+
public setDisallowUnmute(enabled: boolean) {
|
|
6180
|
+
return this.controlsOptionsManager.setDisallowUnmute(enabled);
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6134
6183
|
/**
|
|
6135
6184
|
* End the recording of this meeting
|
|
6136
6185
|
* @returns {Promise}
|