@100mslive/roomkit-react 0.1.6-alpha.0 → 0.1.6-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. package/dist/{HLSView-PY2FKWX3.js → HLSView-QMU5JK7U.js} +208 -118
  2. package/dist/HLSView-QMU5JK7U.js.map +7 -0
  3. package/dist/Prebuilt/AppContext.d.ts +1 -1
  4. package/dist/Prebuilt/components/Chat/ChatFooter.d.ts +7 -0
  5. package/dist/Prebuilt/components/Connection/ConnectionIndicator.d.ts +6 -0
  6. package/dist/Prebuilt/components/Connection/TileConnection.d.ts +10 -0
  7. package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +2 -0
  8. package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +14 -0
  9. package/dist/Prebuilt/components/Footer/RoleOptions.d.ts +6 -0
  10. package/dist/Prebuilt/components/Header/StreamActions.d.ts +11 -0
  11. package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +4 -3
  12. package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +4 -3
  13. package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +1 -2
  14. package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +3 -1
  15. package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +4 -3
  16. package/dist/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.d.ts +6 -0
  17. package/dist/Prebuilt/components/Preview/PreviewContainer.d.ts +3 -0
  18. package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +16 -0
  19. package/dist/Prebuilt/components/RoleChangeRequestModal.d.ts +2 -0
  20. package/dist/Prebuilt/components/SecondaryTiles.d.ts +1 -1
  21. package/dist/Prebuilt/components/SidePaneTabs.d.ts +7 -0
  22. package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +1 -1
  23. package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +1 -0
  24. package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +5 -3
  25. package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +6 -3
  26. package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +1 -1
  27. package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +1 -1
  28. package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +1 -0
  29. package/dist/Prebuilt/components/hooks/useAutoStartStreaming.d.ts +1 -0
  30. package/dist/Prebuilt/components/hooks/useRedirectToLeave.d.ts +3 -0
  31. package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +2 -1
  32. package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +2 -0
  33. package/dist/Prebuilt/layouts/SidePane.d.ts +4 -1
  34. package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +2 -1
  35. package/dist/{VirtualBackground-AYDHYLIZ.js → VirtualBackground-37FXUPYO.js} +6 -6
  36. package/dist/VirtualBackground-37FXUPYO.js.map +7 -0
  37. package/dist/{chunk-GQD2AGWW.js → chunk-KBVIZGYW.js} +12 -2
  38. package/dist/{chunk-GQD2AGWW.js.map → chunk-KBVIZGYW.js.map} +2 -2
  39. package/dist/{chunk-RXTHJUMZ.js → chunk-WVGGQZK4.js} +986 -436
  40. package/dist/chunk-WVGGQZK4.js.map +7 -0
  41. package/dist/{chunk-E2M2ZSOL.js → chunk-ZKE2N5LH.js} +2 -2
  42. package/dist/{conference-V2XZGTKU.js → conference-FJJQ4TXX.js} +1136 -1301
  43. package/dist/conference-FJJQ4TXX.js.map +7 -0
  44. package/dist/index.cjs.js +3565 -3092
  45. package/dist/index.cjs.js.map +4 -4
  46. package/dist/index.js +2 -2
  47. package/dist/meta.cjs.json +773 -525
  48. package/dist/meta.esbuild.json +833 -579
  49. package/package.json +8 -7
  50. package/src/Prebuilt/App.tsx +10 -21
  51. package/src/Prebuilt/AppContext.tsx +1 -1
  52. package/src/Prebuilt/IconButton.jsx +10 -0
  53. package/src/Prebuilt/common/PeersSorter.ts +1 -1
  54. package/src/Prebuilt/common/constants.js +1 -2
  55. package/src/Prebuilt/common/utils.js +1 -1
  56. package/src/Prebuilt/components/AppData/AppData.jsx +8 -2
  57. package/src/Prebuilt/components/AppData/useUISettings.js +6 -6
  58. package/src/Prebuilt/components/AudioVideoToggle.jsx +8 -6
  59. package/src/Prebuilt/components/Chat/Chat.jsx +24 -11
  60. package/src/Prebuilt/components/Chat/ChatBody.jsx +20 -21
  61. package/src/Prebuilt/components/Chat/{ChatFooter.jsx → ChatFooter.tsx} +38 -13
  62. package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +5 -4
  63. package/src/Prebuilt/components/Connection/{ConnectionIndicator.jsx → ConnectionIndicator.tsx} +12 -4
  64. package/src/Prebuilt/components/Connection/{TileConnection.jsx → TileConnection.tsx} +20 -6
  65. package/src/Prebuilt/components/EmojiReaction.jsx +2 -6
  66. package/src/Prebuilt/components/Footer/{ChatToggle.jsx → ChatToggle.tsx} +4 -1
  67. package/src/Prebuilt/components/Footer/Footer.tsx +30 -5
  68. package/src/Prebuilt/components/Footer/ParticipantList.jsx +15 -49
  69. package/src/Prebuilt/components/Footer/{RoleAccordion.jsx → RoleAccordion.tsx} +33 -17
  70. package/src/Prebuilt/components/Footer/RoleOptions.tsx +155 -0
  71. package/src/Prebuilt/components/FullPageProgress.jsx +3 -3
  72. package/src/Prebuilt/components/HMSVideo/Controls.jsx +1 -0
  73. package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +39 -17
  74. package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +2 -2
  75. package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +5 -6
  76. package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +1 -1
  77. package/src/Prebuilt/components/Header/HeaderComponents.jsx +8 -1
  78. package/src/Prebuilt/components/Header/{StreamActions.jsx → StreamActions.tsx} +23 -9
  79. package/src/Prebuilt/components/Header/common.jsx +5 -2
  80. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +6 -1
  81. package/src/Prebuilt/components/InsetTile.tsx +15 -8
  82. package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +21 -11
  83. package/src/Prebuilt/components/Leave/EndSessionContent.tsx +2 -5
  84. package/src/Prebuilt/components/Leave/LeaveCard.tsx +1 -3
  85. package/src/Prebuilt/components/Leave/LeaveRoom.tsx +28 -25
  86. package/src/Prebuilt/components/Leave/LeaveSessionContent.tsx +8 -2
  87. package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +8 -8
  88. package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +4 -0
  89. package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +1 -1
  90. package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +9 -23
  91. package/src/Prebuilt/components/MoreSettings/SplitComponents/{MwebOptions.jsx → MwebOptions.tsx} +89 -28
  92. package/src/Prebuilt/components/Notifications/Notifications.jsx +44 -28
  93. package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +5 -11
  94. package/src/Prebuilt/components/Pagination.tsx +14 -12
  95. package/src/Prebuilt/components/Preview/{PreviewContainer.jsx → PreviewContainer.tsx} +11 -2
  96. package/src/Prebuilt/components/Preview/PreviewForm.tsx +6 -8
  97. package/src/Prebuilt/components/Preview/{PreviewJoin.jsx → PreviewJoin.tsx} +44 -21
  98. package/src/Prebuilt/components/{RoleChangeRequestModal.jsx → RoleChangeRequestModal.tsx} +36 -17
  99. package/src/Prebuilt/components/ScreenshareTile.jsx +6 -7
  100. package/src/Prebuilt/components/SecondaryTiles.tsx +12 -10
  101. package/src/Prebuilt/components/SidePaneTabs.tsx +120 -0
  102. package/src/Prebuilt/components/TileMenu/TileMenu.jsx +1 -1
  103. package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +14 -10
  104. package/src/Prebuilt/components/Toast/ToastConfig.jsx +5 -4
  105. package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +13 -10
  106. package/src/Prebuilt/components/VideoLayouts/Grid.tsx +36 -34
  107. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +33 -15
  108. package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +45 -31
  109. package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +12 -9
  110. package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +25 -9
  111. package/src/Prebuilt/components/VideoLayouts/interface.ts +1 -0
  112. package/src/Prebuilt/components/VideoTile.jsx +45 -53
  113. package/src/Prebuilt/components/conference.jsx +71 -74
  114. package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +57 -0
  115. package/src/Prebuilt/components/hooks/useMetadata.jsx +19 -28
  116. package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +34 -0
  117. package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +1 -1
  118. package/src/Prebuilt/components/hooks/useTileLayout.tsx +24 -18
  119. package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +4 -0
  120. package/src/Prebuilt/layouts/EmbedView.jsx +1 -11
  121. package/src/Prebuilt/layouts/HLSView.jsx +152 -82
  122. package/src/Prebuilt/layouts/SidePane.tsx +25 -11
  123. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +11 -47
  124. package/src/Prebuilt/plugins/FlyingEmoji.jsx +14 -2
  125. package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +3 -3
  126. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +2 -2
  127. package/src/Prebuilt/services/FeatureFlags.jsx +0 -1
  128. package/src/VideoTile/StyledVideoTile.tsx +1 -0
  129. package/dist/HLSView-PY2FKWX3.js.map +0 -7
  130. package/dist/VirtualBackground-AYDHYLIZ.js.map +0 -7
  131. package/dist/chunk-RXTHJUMZ.js.map +0 -7
  132. package/dist/conference-V2XZGTKU.js.map +0 -7
  133. package/src/Prebuilt/components/AudioLevel/BeamSpeakerLabelsLogging.jsx +0 -16
  134. package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +0 -73
  135. package/src/Prebuilt/components/VideoList.jsx +0 -73
  136. /package/dist/{chunk-E2M2ZSOL.js.map → chunk-ZKE2N5LH.js.map} +0 -0
@@ -1,16 +0,0 @@
1
- import { useEffect } from 'react';
2
- import { useHMSActions } from '@100mslive/react-sdk';
3
- import { useIsHeadless } from '../AppData/useUISettings';
4
- import { FeatureFlags } from '../../services/FeatureFlags';
5
-
6
- export function BeamSpeakerLabelsLogging() {
7
- const hmsActions = useHMSActions();
8
- const isHeadless = useIsHeadless();
9
-
10
- useEffect(() => {
11
- if (FeatureFlags.enableBeamSpeakersLogging && isHeadless) {
12
- hmsActions.enableBeamSpeakerLabelsLogging();
13
- }
14
- }, [hmsActions, isHeadless]);
15
- return null;
16
- }
@@ -1,73 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { selectPeerCount, useHMSStore } from '@100mslive/react-sdk';
3
- import { CrossIcon } from '@100mslive/react-icons';
4
- import { Flex, IconButton, Tabs } from '../../..';
5
- import { useSidepaneToggle } from '../AppData/useSidepane';
6
- import { SIDE_PANE_OPTIONS } from '../../common/constants';
7
-
8
- const tabTriggerCSS = {
9
- color: '$on_surface_high',
10
- p: '$4',
11
- fontWeight: '$semiBold',
12
- fontSize: '$sm',
13
- w: '100%',
14
- justifyContent: 'center',
15
- };
16
-
17
- export const ChatParticipantHeader = React.memo(({ activeTabValue = SIDE_PANE_OPTIONS.CHAT }) => {
18
- const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
19
- const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
20
- const [activeTab, setActiveTab] = useState(activeTabValue);
21
- const peerCount = useHMSStore(selectPeerCount);
22
-
23
- return (
24
- <Flex
25
- align="center"
26
- css={{
27
- color: '$on_primary_high',
28
- h: '$16',
29
- }}
30
- >
31
- <Flex css={{ w: '100%', bg: '$surface_default', borderRadius: '$2' }}>
32
- <Tabs.Root value={activeTab} onValueChange={setActiveTab} css={{ w: '100%' }}>
33
- <Tabs.List css={{ w: '100%', p: '$2' }}>
34
- <Tabs.Trigger
35
- value={SIDE_PANE_OPTIONS.CHAT}
36
- onClick={toggleChat}
37
- css={{
38
- ...tabTriggerCSS,
39
- color: activeTab !== SIDE_PANE_OPTIONS.CHAT ? '$on_surface_low' : '$on_surface_high',
40
- }}
41
- >
42
- Chat
43
- </Tabs.Trigger>
44
- <Tabs.Trigger
45
- value={SIDE_PANE_OPTIONS.PARTICIPANTS}
46
- onClick={toggleParticipants}
47
- css={{
48
- ...tabTriggerCSS,
49
- color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? '$on_surface_low' : '$on_surface_high',
50
- }}
51
- >
52
- Participants ({peerCount})
53
- </Tabs.Trigger>
54
- </Tabs.List>
55
- </Tabs.Root>
56
- </Flex>
57
- <IconButton
58
- css={{ ml: 'auto' }}
59
- onClick={e => {
60
- e.stopPropagation();
61
- if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
62
- toggleChat();
63
- } else {
64
- toggleParticipants();
65
- }
66
- }}
67
- data-testid="close_chat"
68
- >
69
- <CrossIcon />
70
- </IconButton>
71
- </Flex>
72
- );
73
- });
@@ -1,73 +0,0 @@
1
- import React, { Fragment, useEffect, useState } from 'react';
2
- import { useVideoList } from '@100mslive/react-sdk';
3
- import { useTheme } from '../../Theme';
4
- import { StyledVideoList } from '../../VideoList';
5
- import { Pagination } from './Pagination';
6
- import ScreenshareTile from './ScreenshareTile';
7
- import VideoTile from './VideoTile';
8
- import { useAppConfig } from './AppData/useAppConfig';
9
- import { useIsHeadless } from './AppData/useUISettings';
10
-
11
- const List = ({ maxTileCount, peers, maxColCount, maxRowCount, includeScreenShareForPeer }) => {
12
- const { aspectRatio } = useTheme();
13
- const tileOffset = useAppConfig('headlessConfig', 'tileOffset');
14
- const isHeadless = useIsHeadless();
15
-
16
- const { ref, pagesWithTiles } = useVideoList({
17
- peers,
18
- maxTileCount,
19
- maxColCount,
20
- maxRowCount,
21
- includeScreenShareForPeer,
22
- aspectRatio,
23
- offsetY: getOffset({ isHeadless, tileOffset }),
24
- });
25
- const [page, setPage] = useState(0);
26
- useEffect(() => {
27
- // currentPageIndex should not exceed pages length
28
- if (page >= pagesWithTiles.length) {
29
- setPage(0);
30
- }
31
- }, [pagesWithTiles.length, page]);
32
- return (
33
- <StyledVideoList.Root ref={ref}>
34
- <StyledVideoList.Container css={{ flexWrap: 'wrap', placeContent: 'center' }}>
35
- {pagesWithTiles && pagesWithTiles.length > 0
36
- ? pagesWithTiles[page]?.map(tile => {
37
- if (tile.width === 0 || tile.height === 0) {
38
- return null;
39
- }
40
- return (
41
- <Fragment key={tile.track?.id || tile.peer.id}>
42
- {tile.track?.source === 'screen' ? (
43
- <ScreenshareTile width={tile.width} height={tile.height} peerId={tile.peer.id} />
44
- ) : (
45
- <VideoTile
46
- width={tile.width}
47
- height={tile.height}
48
- peerId={tile.peer?.id}
49
- trackId={tile.track?.id}
50
- />
51
- )}
52
- </Fragment>
53
- );
54
- })
55
- : null}
56
- </StyledVideoList.Container>
57
- {!isHeadless && pagesWithTiles.length > 1 ? (
58
- <Pagination page={page} onPageChange={setPage} numPages={pagesWithTiles.length} />
59
- ) : null}
60
- </StyledVideoList.Root>
61
- );
62
- };
63
-
64
- const VideoList = React.memo(List);
65
-
66
- const getOffset = ({ tileOffset, isHeadless }) => {
67
- if (!isHeadless || isNaN(Number(tileOffset))) {
68
- return 32;
69
- }
70
- return Number(tileOffset);
71
- };
72
-
73
- export default VideoList;