@100mslive/roomkit-react 0.1.15 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-MXBOUQBG.js → HLSView-ADUOTLEX.js} +2 -2
- package/dist/Prebuilt/common/PeersSorter.d.ts +1 -0
- package/dist/Prebuilt/common/constants.d.ts +7 -4
- package/dist/Prebuilt/common/hooks.d.ts +1 -0
- package/dist/Prebuilt/components/Footer/ParticipantList.d.ts +17 -0
- package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +3 -2
- package/dist/Prebuilt/components/Footer/WhiteboardToggle.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/HandRaisedNotifications.d.ts +1 -0
- package/dist/Prebuilt/components/PreviousRoleInMetadata.d.ts +1 -0
- package/dist/Prebuilt/components/RemoveParticipant.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.d.ts +4 -0
- package/dist/Prebuilt/layouts/WhiteboardView.d.ts +2 -0
- package/dist/{chunk-HEOH5H43.js → chunk-NEXHITYN.js} +1882 -7116
- package/dist/chunk-NEXHITYN.js.map +7 -0
- package/dist/index.cjs.js +2479 -7668
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +438 -161
- package/dist/meta.esbuild.json +443 -166
- package/package.json +7 -7
- package/src/Prebuilt/AppStateContext.tsx +1 -1
- package/src/Prebuilt/common/PeersSorter.ts +12 -5
- package/src/Prebuilt/common/constants.ts +5 -6
- package/src/Prebuilt/common/hooks.ts +16 -0
- package/src/Prebuilt/common/utils.js +5 -6
- package/src/Prebuilt/components/AppData/AppData.tsx +1 -16
- package/src/Prebuilt/components/Chat/Chat.jsx +7 -30
- package/src/Prebuilt/components/Chat/ChatBody.jsx +107 -66
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +21 -12
- package/src/Prebuilt/components/Chat/ChatSelector.tsx +25 -25
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.tsx +15 -16
- package/src/Prebuilt/components/Chat/PinnedMessage.tsx +7 -2
- package/src/Prebuilt/components/ConferenceScreen.tsx +2 -0
- package/src/Prebuilt/components/Footer/ChatToggle.tsx +30 -7
- package/src/Prebuilt/components/Footer/Footer.tsx +2 -1
- package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +0 -1
- package/src/Prebuilt/components/Footer/{ParticipantList.jsx → ParticipantList.tsx} +169 -127
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +23 -13
- package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +34 -0
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +35 -0
- package/src/Prebuilt/components/Notifications/Notifications.tsx +14 -12
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +7 -2
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +10 -2
- package/src/Prebuilt/components/PreviousRoleInMetadata.tsx +21 -0
- package/src/Prebuilt/components/RemoveParticipant.tsx +35 -0
- package/src/Prebuilt/components/RoleChangeModal.jsx +1 -1
- package/src/Prebuilt/components/SidePaneTabs.tsx +0 -1
- package/src/Prebuilt/components/TileMenu/TileMenuContent.tsx +1 -1
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +15 -3
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +1 -2
- package/src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx +24 -0
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +20 -3
- package/src/Prebuilt/layouts/WhiteboardView.tsx +66 -0
- package/dist/chunk-HEOH5H43.js.map +0 -7
- package/src/Prebuilt/components/AppData/useAppLayout.js +0 -6
- package/src/Prebuilt/components/init/initUtils.js +0 -67
- /package/dist/{HLSView-MXBOUQBG.js.map → HLSView-ADUOTLEX.js.map} +0 -0
@@ -1,67 +0,0 @@
|
|
1
|
-
// interface RoleConfig {
|
2
|
-
// center?: HMSRoleName[];
|
3
|
-
// sidepane?: HMSRoleName[];
|
4
|
-
// selfRoleChangeTo?: HMSRoleName[];
|
5
|
-
// remoteRoleChangeFor?: HMSRoleName[];
|
6
|
-
// }
|
7
|
-
|
8
|
-
// interface PolicyConfig {
|
9
|
-
// [role: string]: RoleConfig;
|
10
|
-
// }
|
11
|
-
|
12
|
-
/**
|
13
|
-
* check if a role is allowed to publish either of audio or video
|
14
|
-
*/
|
15
|
-
function canPublishAV(role) {
|
16
|
-
const params = role?.publishParams;
|
17
|
-
if (params?.allowed) {
|
18
|
-
return params.allowed.includes('video') || params.allowed.includes('audio');
|
19
|
-
}
|
20
|
-
return false;
|
21
|
-
}
|
22
|
-
|
23
|
-
/**
|
24
|
-
* Figure out the layout for each role. There is some extra work being done
|
25
|
-
* here currently to figure out the layout for roles other than local peer too
|
26
|
-
* which can be avoided.
|
27
|
-
*/
|
28
|
-
export const normalizeAppPolicyConfig = (roleNames, rolesMap, appPolicyConfig = {}) => {
|
29
|
-
const newConfig = Object.assign({}, appPolicyConfig);
|
30
|
-
// eslint-disable-next-line complexity
|
31
|
-
roleNames.forEach(roleName => {
|
32
|
-
if (!newConfig[roleName]) {
|
33
|
-
newConfig[roleName] = {};
|
34
|
-
}
|
35
|
-
const subscribedRoles = rolesMap[roleName].subscribeParams?.subscribeToRoles || [];
|
36
|
-
|
37
|
-
const isNotSubscribingOrSubscribingToSelf =
|
38
|
-
subscribedRoles.length === 0 || (subscribedRoles.length === 1 && subscribedRoles[0] === roleName);
|
39
|
-
if (!newConfig[roleName].center) {
|
40
|
-
const publishingRoleNames = roleNames.filter(
|
41
|
-
roleName => canPublishAV(rolesMap[roleName]) && subscribedRoles.includes(roleName),
|
42
|
-
);
|
43
|
-
if (isNotSubscribingOrSubscribingToSelf) {
|
44
|
-
newConfig[roleName].center = [roleName];
|
45
|
-
} else {
|
46
|
-
// all other publishing roles apart from local role in center by default
|
47
|
-
newConfig[roleName].center = publishingRoleNames.filter(rName => rName !== roleName);
|
48
|
-
}
|
49
|
-
}
|
50
|
-
// everyone from my role is in sidepane by default if they can publish
|
51
|
-
if (!newConfig[roleName].sidepane) {
|
52
|
-
if (isNotSubscribingOrSubscribingToSelf) {
|
53
|
-
newConfig[roleName].sidepane = [];
|
54
|
-
} else {
|
55
|
-
newConfig[roleName].sidepane = canPublishAV(rolesMap[roleName]) ? [roleName] : [];
|
56
|
-
}
|
57
|
-
}
|
58
|
-
if (!newConfig[roleName].selfRoleChangeTo) {
|
59
|
-
newConfig[roleName].selfRoleChangeTo = roleNames;
|
60
|
-
}
|
61
|
-
if (!newConfig[roleName].remoteRoleChangeFor) {
|
62
|
-
newConfig[roleName].remoteRoleChangeFor = roleNames;
|
63
|
-
}
|
64
|
-
});
|
65
|
-
|
66
|
-
return newConfig;
|
67
|
-
};
|
File without changes
|