@webex/plugin-meetings 3.0.0-beta.205 → 3.0.0-beta.207

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.
@@ -68,8 +68,11 @@ interface IInMeetingActions {
68
68
  canShareDesktop?: boolean;
69
69
  canShareContent?: boolean;
70
70
  canTransferFile?: boolean;
71
+ canDoVideo?: boolean;
71
72
  canAnnotate?: boolean;
72
73
  canUseVoip?: boolean;
74
+ supportHQV?: boolean;
75
+ supportHDV?: boolean;
73
76
  canShareWhiteBoard?: boolean;
74
77
  }
75
78
  /**
@@ -139,8 +142,11 @@ export default class InMeetingActions implements IInMeetingActions {
139
142
  canShareDesktop: any;
140
143
  canShareContent: any;
141
144
  canTransferFile: any;
145
+ canDoVideo: any;
142
146
  canAnnotate: any;
143
147
  canUseVoip: any;
148
+ supportHQV: any;
149
+ supportHDV: any;
144
150
  canShareWhiteBoard: any;
145
151
  /**
146
152
  * Returns all meeting action options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.205",
3
+ "version": "3.0.0-beta.207",
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.205",
36
- "@webex/test-helper-chai": "3.0.0-beta.205",
37
- "@webex/test-helper-mocha": "3.0.0-beta.205",
38
- "@webex/test-helper-mock-webex": "3.0.0-beta.205",
39
- "@webex/test-helper-retry": "3.0.0-beta.205",
40
- "@webex/test-helper-test-users": "3.0.0-beta.205",
35
+ "@webex/plugin-meetings": "3.0.0-beta.207",
36
+ "@webex/test-helper-chai": "3.0.0-beta.207",
37
+ "@webex/test-helper-mocha": "3.0.0-beta.207",
38
+ "@webex/test-helper-mock-webex": "3.0.0-beta.207",
39
+ "@webex/test-helper-retry": "3.0.0-beta.207",
40
+ "@webex/test-helper-test-users": "3.0.0-beta.207",
41
41
  "chai": "^4.3.4",
42
42
  "chai-as-promised": "^7.1.1",
43
43
  "jsdom-global": "3.0.2",
@@ -46,19 +46,19 @@
46
46
  "typescript": "^4.7.4"
47
47
  },
48
48
  "dependencies": {
49
- "@webex/common": "3.0.0-beta.205",
49
+ "@webex/common": "3.0.0-beta.207",
50
50
  "@webex/internal-media-core": "1.39.1",
51
- "@webex/internal-plugin-conversation": "3.0.0-beta.205",
52
- "@webex/internal-plugin-device": "3.0.0-beta.205",
53
- "@webex/internal-plugin-llm": "3.0.0-beta.205",
54
- "@webex/internal-plugin-mercury": "3.0.0-beta.205",
55
- "@webex/internal-plugin-metrics": "3.0.0-beta.205",
56
- "@webex/internal-plugin-support": "3.0.0-beta.205",
57
- "@webex/internal-plugin-user": "3.0.0-beta.205",
58
- "@webex/media-helpers": "3.0.0-beta.205",
59
- "@webex/plugin-people": "3.0.0-beta.205",
60
- "@webex/plugin-rooms": "3.0.0-beta.205",
61
- "@webex/webex-core": "3.0.0-beta.205",
51
+ "@webex/internal-plugin-conversation": "3.0.0-beta.207",
52
+ "@webex/internal-plugin-device": "3.0.0-beta.207",
53
+ "@webex/internal-plugin-llm": "3.0.0-beta.207",
54
+ "@webex/internal-plugin-mercury": "3.0.0-beta.207",
55
+ "@webex/internal-plugin-metrics": "3.0.0-beta.207",
56
+ "@webex/internal-plugin-support": "3.0.0-beta.207",
57
+ "@webex/internal-plugin-user": "3.0.0-beta.207",
58
+ "@webex/media-helpers": "3.0.0-beta.207",
59
+ "@webex/plugin-people": "3.0.0-beta.207",
60
+ "@webex/plugin-rooms": "3.0.0-beta.207",
61
+ "@webex/webex-core": "3.0.0-beta.207",
62
62
  "ampersand-collection": "^2.0.2",
63
63
  "bowser": "^2.11.0",
64
64
  "btoa": "^1.2.1",
@@ -71,8 +71,11 @@ interface IInMeetingActions {
71
71
  canShareDesktop?: boolean;
72
72
  canShareContent?: boolean;
73
73
  canTransferFile?: boolean;
74
+ canDoVideo?: boolean;
74
75
  canAnnotate?: boolean;
75
76
  canUseVoip?: boolean;
77
+ supportHQV?: boolean;
78
+ supportHDV?: boolean;
76
79
  canShareWhiteBoard?: boolean;
77
80
  }
78
81
 
@@ -206,10 +209,16 @@ export default class InMeetingActions implements IInMeetingActions {
206
209
 
207
210
  canTransferFile = null;
208
211
 
212
+ canDoVideo = null;
213
+
209
214
  canAnnotate = null;
210
215
 
211
216
  canUseVoip = null;
212
217
 
218
+ supportHQV = null;
219
+
220
+ supportHDV = null;
221
+
213
222
  canShareWhiteBoard = null;
214
223
 
215
224
  /**
@@ -279,8 +288,11 @@ export default class InMeetingActions implements IInMeetingActions {
279
288
  canShareDesktop: this.canShareDesktop,
280
289
  canShareContent: this.canShareContent,
281
290
  canTransferFile: this.canTransferFile,
291
+ canDoVideo: this.canDoVideo,
282
292
  canAnnotate: this.canAnnotate,
283
293
  canUseVoip: this.canUseVoip,
294
+ supportHQV: this.supportHQV,
295
+ supportHDV: this.supportHDV,
284
296
  canShareWhiteBoard: this.canShareWhiteBoard,
285
297
  });
286
298
 
@@ -3073,6 +3073,27 @@ export default class Meeting extends StatelessWebexPlugin {
3073
3073
  policies: this.selfUserPolicies,
3074
3074
  })) ||
3075
3075
  !this.arePolicyRestrictionsSupported(),
3076
+ canDoVideo:
3077
+ (ControlsOptionsUtil.hasPolicies({
3078
+ requiredPolicies: [SELF_POLICY.SUPPORT_VIDEO],
3079
+ policies: this.selfUserPolicies,
3080
+ }) &&
3081
+ !!this.meetingInfo?.video) ||
3082
+ !this.arePolicyRestrictionsSupported(),
3083
+ supportHDV:
3084
+ (ControlsOptionsUtil.hasPolicies({
3085
+ requiredPolicies: [SELF_POLICY.SUPPORT_HDV],
3086
+ policies: this.selfUserPolicies,
3087
+ }) &&
3088
+ this.meetingInfo?.video?.supportHDV) ||
3089
+ !this.arePolicyRestrictionsSupported(),
3090
+ supportHQV:
3091
+ (ControlsOptionsUtil.hasPolicies({
3092
+ requiredPolicies: [SELF_POLICY.SUPPORT_HQV],
3093
+ policies: this.selfUserPolicies,
3094
+ }) &&
3095
+ this.meetingInfo?.video?.supportHQV) ||
3096
+ !this.arePolicyRestrictionsSupported(),
3076
3097
  });
3077
3098
  if (this.userDisplayHints !== undefined) {
3078
3099
  changed =
@@ -67,8 +67,11 @@ describe('plugin-meetings', () => {
67
67
  canShareDesktop: null,
68
68
  canShareContent: null,
69
69
  canTransferFile: null,
70
+ canDoVideo: null,
70
71
  canAnnotate: null,
71
72
  canUseVoip: null,
73
+ supportHQV: null,
74
+ supportHDV: null,
72
75
  canShareWhiteBoard: null,
73
76
  ...expected,
74
77
  };
@@ -142,8 +145,11 @@ describe('plugin-meetings', () => {
142
145
  'canShareDesktop',
143
146
  'canShareContent',
144
147
  'canTransferFile',
148
+ 'canDoVideo',
145
149
  'canAnnotate',
146
150
  'canUseVoip',
151
+ 'supportHQV',
152
+ 'supportHDV',
147
153
  'canShareWhiteBoard',
148
154
  ].forEach((key) => {
149
155
  it(`get and set for ${key} work as expected`, () => {
@@ -6058,6 +6058,90 @@ describe('plugin-meetings', () => {
6058
6058
  }
6059
6059
  );
6060
6060
 
6061
+
6062
+ forEach(
6063
+ [
6064
+ {
6065
+ meetingInfo: {
6066
+ video: {
6067
+ supportHDV: true,
6068
+ supportHQV: true,
6069
+ },
6070
+ },
6071
+ selfUserPolicies: {
6072
+ [SELF_POLICY.SUPPORT_HDV]: true,
6073
+ [SELF_POLICY.SUPPORT_HQV]: true,
6074
+ },
6075
+ expectedActions: {
6076
+ supportHQV: true,
6077
+ supportHDV: true,
6078
+ },
6079
+ },
6080
+ {
6081
+ meetingInfo: {
6082
+ video: {
6083
+ supportHDV: false,
6084
+ supportHQV: false,
6085
+ },
6086
+ },
6087
+ selfUserPolicies: {
6088
+ [SELF_POLICY.SUPPORT_HDV]: true,
6089
+ [SELF_POLICY.SUPPORT_HQV]: true,
6090
+ },
6091
+ expectedActions: {
6092
+ supportHQV: false,
6093
+ supportHDV: false,
6094
+ },
6095
+ },
6096
+ {
6097
+ meetingInfo: {
6098
+ video: {
6099
+ supportHDV: true,
6100
+ supportHQV: true,
6101
+ },
6102
+ },
6103
+ selfUserPolicies: {
6104
+ [SELF_POLICY.SUPPORT_HDV]: false,
6105
+ [SELF_POLICY.SUPPORT_HQV]: false,
6106
+ },
6107
+ expectedActions: {
6108
+ supportHQV: false,
6109
+ supportHDV: false,
6110
+ },
6111
+ },
6112
+ {
6113
+ meetingInfo: undefined,
6114
+ selfUserPolicies: {
6115
+ },
6116
+ expectedActions: {
6117
+ supportHQV: true,
6118
+ supportHDV: true,
6119
+ },
6120
+ },
6121
+ ],
6122
+ ({meetingInfo, selfUserPolicies, expectedActions}) => {
6123
+ it(`expectedActions are ${JSON.stringify(
6124
+ expectedActions
6125
+ )} when policies are ${JSON.stringify(
6126
+ selfUserPolicies
6127
+ )} and meetingInfo is ${JSON.stringify(meetingInfo)}`, () => {
6128
+ meeting.meetingInfo = meetingInfo;
6129
+ meeting.selfUserPolicies = selfUserPolicies;
6130
+ meeting.config.experimental.enableUnifiedMeetings = true;
6131
+
6132
+ meeting.updateMeetingActions();
6133
+
6134
+ assert.deepEqual(
6135
+ {
6136
+ supportHDV: meeting.inMeetingActions.supportHDV,
6137
+ supportHQV: meeting.inMeetingActions.supportHQV,
6138
+ },
6139
+ expectedActions
6140
+ );
6141
+ });
6142
+ }
6143
+ );
6144
+
6061
6145
  it('canUseVoip is enabled based on locus info when the conditions are met', () => {
6062
6146
  meeting.userDisplayHints = [DISPLAY_HINTS.VOIP_IS_ENABLED];
6063
6147
  meeting.selfUserPolicies = {[SELF_POLICY.SUPPORT_VOIP]: true};
@@ -6153,6 +6237,87 @@ describe('plugin-meetings', () => {
6153
6237
  assert.isTrue(meeting.inMeetingActions.get()['canUseVoip']);
6154
6238
  });
6155
6239
 
6240
+ forEach(
6241
+ [
6242
+ {
6243
+ meetingInfo: {},
6244
+ selfUserPolicies: {
6245
+ [SELF_POLICY.SUPPORT_VIDEO]: true,
6246
+ },
6247
+ expectedActions: {
6248
+ canDoVideo: true,
6249
+ },
6250
+ },
6251
+ {
6252
+ meetingInfo: {},
6253
+ selfUserPolicies: {
6254
+ [SELF_POLICY.SUPPORT_VIDEO]: false,
6255
+ },
6256
+ expectedActions: {
6257
+ canDoVideo: true,
6258
+ },
6259
+ },
6260
+ {
6261
+ meetingInfo: {some: 'data'},
6262
+ selfUserPolicies: {
6263
+ [SELF_POLICY.SUPPORT_VIDEO]: true,
6264
+ },
6265
+ expectedActions: {
6266
+ canDoVideo: false,
6267
+ },
6268
+ },
6269
+ {
6270
+ meetingInfo: {
6271
+ video: {},
6272
+ },
6273
+ selfUserPolicies: {
6274
+ [SELF_POLICY.SUPPORT_VIDEO]: true,
6275
+ },
6276
+ expectedActions: {
6277
+ canDoVideo: true,
6278
+ },
6279
+ },
6280
+ {
6281
+ meetingInfo: undefined,
6282
+ selfUserPolicies: {},
6283
+ expectedActions: {
6284
+ canDoVideo: true,
6285
+ },
6286
+ },
6287
+ {
6288
+ meetingInfo: {
6289
+ video: {},
6290
+ },
6291
+ selfUserPolicies: {
6292
+ [SELF_POLICY.SUPPORT_VIDEO]: false,
6293
+ },
6294
+ expectedActions: {
6295
+ canDoVideo: false,
6296
+ },
6297
+ },
6298
+ ],
6299
+ ({meetingInfo, selfUserPolicies, expectedActions}) => {
6300
+ it(`has expectedActions ${JSON.stringify(
6301
+ expectedActions
6302
+ )} when policies are ${JSON.stringify(
6303
+ selfUserPolicies
6304
+ )} and meetingInfo is ${JSON.stringify(meetingInfo)}`, () => {
6305
+ meeting.meetingInfo = meetingInfo;
6306
+ meeting.selfUserPolicies = selfUserPolicies;
6307
+ meeting.config.experimental.enableUnifiedMeetings = true;
6308
+
6309
+ meeting.updateMeetingActions();
6310
+
6311
+ assert.deepEqual(
6312
+ {
6313
+ canDoVideo: meeting.inMeetingActions.canDoVideo,
6314
+ },
6315
+ expectedActions
6316
+ );
6317
+ });
6318
+ }
6319
+ );
6320
+
6156
6321
  it('correctly updates the meeting actions', () => {
6157
6322
  // Due to import tree issues, hasHints must be stubed within the scope of the `it`.
6158
6323
  const restorableHasHints = ControlsOptionsUtil.hasHints;