@webex/plugin-meetings 2.30.1 → 2.31.0

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.
@@ -58,7 +58,9 @@ SelfUtils.parse = (self, deviceId) => {
58
58
  removed: self.removed,
59
59
  roles: SelfUtils.getRoles(self),
60
60
  isUserUnadmitted: self.state === _IDLE_ && joinedWith?.intent?.type === _WAIT_,
61
- layout: SelfUtils.getLayout(self)
61
+ layout: SelfUtils.getLayout(self),
62
+ canNotViewTheParticipantList: SelfUtils.canNotViewTheParticipantList(self),
63
+ isSharingBlocked: SelfUtils.isSharingBlocked(self)
62
64
  };
63
65
  }
64
66
 
@@ -75,6 +77,10 @@ SelfUtils.getRoles = (self) => (self?.controls?.role?.roles || []).reduce((roles
75
77
  return roles;
76
78
  }, []);
77
79
 
80
+ SelfUtils.canNotViewTheParticipantList = (self) => !!self?.canNotViewTheParticipantList;
81
+
82
+ SelfUtils.isSharingBlocked = (self) => !!self?.isSharingBlocked;
83
+
78
84
  SelfUtils.getSelves = (oldSelf, newSelf, deviceId) => {
79
85
  const previous = oldSelf && SelfUtils.parse(oldSelf, deviceId);
80
86
  const current = newSelf && SelfUtils.parse(newSelf, deviceId);
@@ -95,6 +101,9 @@ SelfUtils.getSelves = (oldSelf, newSelf, deviceId) => {
95
101
  updates.videoStateChange = previous?.currentMediaStatus.video !== current.currentMediaStatus.video;
96
102
  updates.shareStateChange = previous?.currentMediaStatus.share !== current.currentMediaStatus.share;
97
103
 
104
+ updates.canNotViewTheParticipantListChanged = previous?.canNotViewTheParticipantList !== current.canNotViewTheParticipantList;
105
+ updates.isSharingBlockedChanged = previous?.isSharingBlocked !== current.isSharingBlocked;
106
+
98
107
  return {
99
108
  previous,
100
109
  current,
@@ -1589,6 +1589,19 @@ export default class Meeting extends StatelessWebexPlugin {
1589
1589
  );
1590
1590
  }
1591
1591
  });
1592
+
1593
+ this.locusInfo.on(LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED,
1594
+ ({entryExitTone}) => {
1595
+ Trigger.trigger(
1596
+ this,
1597
+ {
1598
+ file: 'meeting/index',
1599
+ function: 'setupLocusControlsListener'
1600
+ },
1601
+ EVENT_TRIGGERS.MEETING_ENTRY_EXIT_TONE_UPDATE,
1602
+ {entryExitTone}
1603
+ );
1604
+ });
1592
1605
  }
1593
1606
 
1594
1607
  /**
@@ -2072,6 +2085,34 @@ export default class Meeting extends StatelessWebexPlugin {
2072
2085
  });
2073
2086
  }
2074
2087
  });
2088
+
2089
+ this.locusInfo.on(LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE, (payload) => {
2090
+ Trigger.trigger(
2091
+ this,
2092
+ {
2093
+ file: 'meeting/index',
2094
+ function: 'setUpLocusInfoSelfListener'
2095
+ },
2096
+ EVENT_TRIGGERS.MEETING_SELF_CANNOT_VIEW_PARTICIPANT_LIST,
2097
+ {
2098
+ payload
2099
+ }
2100
+ );
2101
+ });
2102
+
2103
+ this.locusInfo.on(LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE, (payload) => {
2104
+ Trigger.trigger(
2105
+ this,
2106
+ {
2107
+ file: 'meeting/index',
2108
+ function: 'setUpLocusInfoSelfListener'
2109
+ },
2110
+ EVENT_TRIGGERS.MEETING_SELF_IS_SHARING_BLOCKED,
2111
+ {
2112
+ payload
2113
+ }
2114
+ );
2115
+ });
2075
2116
  }
2076
2117
 
2077
2118
  /**
@@ -0,0 +1,82 @@
1
+ import {assert} from '@webex/test-helper-chai';
2
+ import ControlsUtils from '@webex/plugin-meetings/src/locus-info/controlsUtils';
3
+
4
+ const defaultControls = {
5
+ entryExitTone: {
6
+ enabled: true,
7
+ mode: 'foo',
8
+ }
9
+ };
10
+
11
+ describe('plugin-meetings', () => {
12
+ describe('controlsUtils', () => {
13
+ describe('parse', () => {
14
+ it('parses entryExitTone', () => {
15
+ const parsedControls = ControlsUtils.parse(defaultControls);
16
+
17
+ assert.equal(parsedControls.entryExitTone, 'foo');
18
+ });
19
+
20
+ it('parses entryExitTone when disabled', () => {
21
+ const parsedControls = ControlsUtils.parse({
22
+ entryExitTone: {
23
+ enabled: false,
24
+ mode: 'foo',
25
+ }
26
+ });
27
+
28
+ assert.equal(parsedControls.entryExitTone, null);
29
+ });
30
+
31
+ it('handles no entryExitTone', () => {
32
+ const parsedControls = ControlsUtils.parse({});
33
+
34
+ assert.equal(parsedControls.entryExitTone, null);
35
+ });
36
+
37
+ it('handles no controls', () => {
38
+ const parsedControls = ControlsUtils.parse();
39
+
40
+ assert.equal(parsedControls.entryExitTone, null);
41
+ });
42
+ });
43
+ });
44
+
45
+ describe('getControls', () => {
46
+ it('returns hasEntryExitToneChanged = true when mode changed', () => {
47
+ const newControls = {
48
+ entryExitTone: {
49
+ enabled: true,
50
+ mode: 'bar',
51
+ }
52
+ };
53
+ const {updates} = ControlsUtils.getControls(defaultControls, newControls);
54
+
55
+ assert.equal(updates.hasEntryExitToneChanged, true);
56
+ });
57
+
58
+ it('returns hasEntryExitToneChanged = true when enabled changed', () => {
59
+ const newControls = {
60
+ entryExitTone: {
61
+ enabled: false,
62
+ mode: 'foo',
63
+ }
64
+ };
65
+ const {updates} = ControlsUtils.getControls(defaultControls, newControls);
66
+
67
+ assert.equal(updates.hasEntryExitToneChanged, true);
68
+ });
69
+
70
+ it('returns hasEntryExitToneChanged = false when nothing changed', () => {
71
+ const newControls = {
72
+ entryExitTone: {
73
+ enabled: true,
74
+ mode: 'foo',
75
+ }
76
+ };
77
+ const {updates} = ControlsUtils.getControls(defaultControls, newControls);
78
+
79
+ assert.equal(updates.hasEntryExitToneChanged, false);
80
+ });
81
+ });
82
+ });