@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.
Files changed (81) hide show
  1. package/dist/{HLSView-662T7R7H.js → HLSView-EMUOLCTM.js} +128 -39
  2. package/dist/HLSView-EMUOLCTM.js.map +7 -0
  3. package/dist/Prebuilt/common/PeersSorter.d.ts +1 -0
  4. package/dist/Prebuilt/common/constants.d.ts +9 -5
  5. package/dist/Prebuilt/common/hooks.d.ts +1 -0
  6. package/dist/Prebuilt/components/Footer/ParticipantList.d.ts +17 -0
  7. package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +3 -2
  8. package/dist/Prebuilt/components/Footer/WhiteboardToggle.d.ts +2 -0
  9. package/dist/Prebuilt/components/HMSVideo/HLSCaptionSelector.d.ts +5 -0
  10. package/dist/Prebuilt/components/Notifications/HandRaisedNotifications.d.ts +1 -0
  11. package/dist/Prebuilt/components/Polls/Voting/Leaderboard.d.ts +4 -0
  12. package/dist/Prebuilt/components/Polls/Voting/LeaderboardEntry.d.ts +9 -0
  13. package/dist/Prebuilt/components/Polls/Voting/PeerParticipationSummary.d.ts +5 -0
  14. package/dist/Prebuilt/components/PreviousRoleInMetadata.d.ts +1 -0
  15. package/dist/Prebuilt/components/RemoveParticipant.d.ts +5 -0
  16. package/dist/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.d.ts +4 -0
  17. package/dist/Prebuilt/layouts/WhiteboardView.d.ts +2 -0
  18. package/dist/{chunk-2B7YYNHQ.js → chunk-ZYR4B4KQ.js} +2240 -1767
  19. package/dist/chunk-ZYR4B4KQ.js.map +7 -0
  20. package/dist/index.cjs.js +2805 -2172
  21. package/dist/index.cjs.js.map +4 -4
  22. package/dist/index.js +1 -1
  23. package/dist/meta.cjs.json +739 -177
  24. package/dist/meta.esbuild.json +749 -186
  25. package/package.json +7 -7
  26. package/src/Prebuilt/AppStateContext.tsx +1 -1
  27. package/src/Prebuilt/common/PeersSorter.ts +24 -8
  28. package/src/Prebuilt/common/constants.ts +6 -6
  29. package/src/Prebuilt/common/hooks.ts +16 -0
  30. package/src/Prebuilt/common/utils.js +33 -0
  31. package/src/Prebuilt/components/AppData/AppData.tsx +1 -16
  32. package/src/Prebuilt/components/Chat/Chat.jsx +10 -34
  33. package/src/Prebuilt/components/Chat/ChatBody.jsx +107 -66
  34. package/src/Prebuilt/components/Chat/ChatFooter.tsx +21 -12
  35. package/src/Prebuilt/components/Chat/ChatSelector.tsx +25 -25
  36. package/src/Prebuilt/components/Chat/ChatSelectorContainer.tsx +15 -16
  37. package/src/Prebuilt/components/Chat/PinnedMessage.tsx +7 -2
  38. package/src/Prebuilt/components/ConferenceScreen.tsx +2 -0
  39. package/src/Prebuilt/components/Footer/ChatToggle.tsx +30 -7
  40. package/src/Prebuilt/components/Footer/Footer.tsx +2 -1
  41. package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +0 -1
  42. package/src/Prebuilt/components/Footer/{ParticipantList.jsx → ParticipantList.tsx} +169 -127
  43. package/src/Prebuilt/components/Footer/RoleAccordion.tsx +23 -13
  44. package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +34 -0
  45. package/src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx +13 -0
  46. package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +34 -2
  47. package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +35 -0
  48. package/src/Prebuilt/components/Notifications/Notifications.tsx +47 -14
  49. package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +7 -2
  50. package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.jsx +3 -9
  51. package/src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx +21 -1
  52. package/src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.jsx +34 -7
  53. package/src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.jsx +2 -2
  54. package/src/Prebuilt/components/Polls/Polls.tsx +3 -0
  55. package/src/Prebuilt/components/Polls/Voting/Leaderboard.tsx +115 -0
  56. package/src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx +63 -0
  57. package/src/Prebuilt/components/Polls/Voting/PeerParticipationSummary.tsx +38 -0
  58. package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +33 -8
  59. package/src/Prebuilt/components/Polls/Voting/StandardVoting.jsx +7 -1
  60. package/src/Prebuilt/components/Polls/Voting/Voting.jsx +31 -13
  61. package/src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx +33 -21
  62. package/src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx +47 -35
  63. package/src/Prebuilt/components/Polls/common/StatusIndicator.jsx +2 -22
  64. package/src/Prebuilt/components/Polls/common/VoteCount.jsx +1 -15
  65. package/src/Prebuilt/components/PreviousRoleInMetadata.tsx +21 -0
  66. package/src/Prebuilt/components/RemoveParticipant.tsx +35 -0
  67. package/src/Prebuilt/components/RoleChangeModal.jsx +1 -1
  68. package/src/Prebuilt/components/SidePaneTabs.tsx +0 -1
  69. package/src/Prebuilt/components/TileMenu/TileMenuContent.tsx +1 -1
  70. package/src/Prebuilt/components/Toast/ToastConfig.jsx +15 -3
  71. package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +6 -5
  72. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +27 -5
  73. package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +0 -1
  74. package/src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx +24 -0
  75. package/src/Prebuilt/layouts/HLSView.jsx +51 -3
  76. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +20 -3
  77. package/src/Prebuilt/layouts/WhiteboardView.tsx +66 -0
  78. package/dist/HLSView-662T7R7H.js.map +0 -7
  79. package/dist/chunk-2B7YYNHQ.js.map +0 -7
  80. package/src/Prebuilt/components/AppData/useAppLayout.js +0 -6
  81. package/src/Prebuilt/components/init/initUtils.js +0 -67
@@ -1,6 +0,0 @@
1
- import { selectAppDataByPath, useHMSStore } from '@100mslive/react-sdk';
2
- import { APP_DATA } from '../../common/constants';
3
-
4
- export const useAppLayout = path => {
5
- return useHMSStore(selectAppDataByPath(APP_DATA.appLayout, path));
6
- };
@@ -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
- };