@100mslive/roomkit-react 0.1.14 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-662T7R7H.js → HLSView-EMUOLCTM.js} +128 -39
- package/dist/HLSView-EMUOLCTM.js.map +7 -0
- package/dist/Prebuilt/common/PeersSorter.d.ts +1 -0
- package/dist/Prebuilt/common/constants.d.ts +9 -5
- 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/HMSVideo/HLSCaptionSelector.d.ts +5 -0
- package/dist/Prebuilt/components/Notifications/HandRaisedNotifications.d.ts +1 -0
- package/dist/Prebuilt/components/Polls/Voting/Leaderboard.d.ts +4 -0
- package/dist/Prebuilt/components/Polls/Voting/LeaderboardEntry.d.ts +9 -0
- package/dist/Prebuilt/components/Polls/Voting/PeerParticipationSummary.d.ts +5 -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-2B7YYNHQ.js → chunk-ZYR4B4KQ.js} +2240 -1767
- package/dist/chunk-ZYR4B4KQ.js.map +7 -0
- package/dist/index.cjs.js +2805 -2172
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +739 -177
- package/dist/meta.esbuild.json +749 -186
- package/package.json +7 -7
- package/src/Prebuilt/AppStateContext.tsx +1 -1
- package/src/Prebuilt/common/PeersSorter.ts +24 -8
- package/src/Prebuilt/common/constants.ts +6 -6
- package/src/Prebuilt/common/hooks.ts +16 -0
- package/src/Prebuilt/common/utils.js +33 -0
- package/src/Prebuilt/components/AppData/AppData.tsx +1 -16
- package/src/Prebuilt/components/Chat/Chat.jsx +10 -34
- 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/HMSVideo/HLSCaptionSelector.tsx +13 -0
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +34 -2
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +35 -0
- package/src/Prebuilt/components/Notifications/Notifications.tsx +47 -14
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +7 -2
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.jsx +3 -9
- package/src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx +21 -1
- package/src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.jsx +34 -7
- package/src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.jsx +2 -2
- package/src/Prebuilt/components/Polls/Polls.tsx +3 -0
- package/src/Prebuilt/components/Polls/Voting/Leaderboard.tsx +115 -0
- package/src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx +63 -0
- package/src/Prebuilt/components/Polls/Voting/PeerParticipationSummary.tsx +38 -0
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +33 -8
- package/src/Prebuilt/components/Polls/Voting/StandardVoting.jsx +7 -1
- package/src/Prebuilt/components/Polls/Voting/Voting.jsx +31 -13
- package/src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx +33 -21
- package/src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx +47 -35
- package/src/Prebuilt/components/Polls/common/StatusIndicator.jsx +2 -22
- package/src/Prebuilt/components/Polls/common/VoteCount.jsx +1 -15
- 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/EqualProminence.tsx +6 -5
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +27 -5
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +0 -1
- package/src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx +24 -0
- package/src/Prebuilt/layouts/HLSView.jsx +51 -3
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +20 -3
- package/src/Prebuilt/layouts/WhiteboardView.tsx +66 -0
- package/dist/HLSView-662T7R7H.js.map +0 -7
- package/dist/chunk-2B7YYNHQ.js.map +0 -7
- package/src/Prebuilt/components/AppData/useAppLayout.js +0 -6
- package/src/Prebuilt/components/init/initUtils.js +0 -67
@@ -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
|
-
};
|