@100mslive/roomkit-react 0.1.4 → 0.1.6-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-CTAJQUU4.js → HLSView-PY2FKWX3.js} +191 -123
- package/dist/HLSView-PY2FKWX3.js.map +7 -0
- package/dist/Prebuilt/App.d.ts +3 -0
- package/dist/Prebuilt/AppContext.d.ts +13 -0
- package/dist/Prebuilt/common/PeersSorter.d.ts +21 -0
- package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
- package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
- package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
- package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +12 -0
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
- package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +6 -0
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/MoreSettings/MoreSettings.d.ts +6 -0
- package/dist/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Pagination.d.ts +6 -0
- package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
- package/dist/Prebuilt/components/SecondaryTiles.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +5 -0
- package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +10 -0
- package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +12 -0
- package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +8 -0
- package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +12 -0
- package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +11 -0
- package/dist/Prebuilt/layouts/SidePane.d.ts +6 -0
- package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +6 -0
- package/dist/Prebuilt/plugins/whiteboard/ToggleWhiteboard.d.ts +5 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +17 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +6 -1
- package/dist/{VirtualBackground-GGGBJYVY.js → VirtualBackground-AYDHYLIZ.js} +5 -11
- package/dist/VirtualBackground-AYDHYLIZ.js.map +7 -0
- package/dist/{chunk-TJNDX446.js → chunk-E2M2ZSOL.js} +8 -5
- package/dist/chunk-E2M2ZSOL.js.map +7 -0
- package/dist/chunk-GQD2AGWW.js +888 -0
- package/dist/chunk-GQD2AGWW.js.map +7 -0
- package/dist/{chunk-L2SX7GBO.js → chunk-RXTHJUMZ.js} +2462 -4738
- package/dist/chunk-RXTHJUMZ.js.map +7 -0
- package/dist/conference-V2XZGTKU.js +5927 -0
- package/dist/conference-V2XZGTKU.js.map +7 -0
- package/dist/index.cjs.js +9414 -15534
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +2156 -3347
- package/dist/meta.esbuild.json +2601 -3885
- package/package.json +7 -7
- package/src/Button/Button.tsx +2 -2
- package/src/Prebuilt/App.tsx +49 -33
- package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
- package/src/Prebuilt/IconButton.jsx +1 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
- package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +15 -10
- package/src/Prebuilt/common/constants.js +3 -112
- package/src/Prebuilt/common/hooks.js +34 -1
- package/src/Prebuilt/common/utils.js +0 -8
- package/src/Prebuilt/components/AppData/AppData.jsx +3 -13
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
- package/src/Prebuilt/components/AudioVideoToggle.jsx +6 -0
- package/src/Prebuilt/components/AuthToken.jsx +11 -42
- package/src/Prebuilt/components/Chat/Chat.jsx +57 -26
- package/src/Prebuilt/components/Chat/ChatBody.jsx +92 -32
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +72 -48
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +73 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
- package/src/Prebuilt/components/Connection/TileConnection.jsx +30 -12
- package/src/Prebuilt/components/EmojiReaction.jsx +18 -17
- package/src/Prebuilt/components/Footer/ChatToggle.jsx +1 -7
- package/src/Prebuilt/components/Footer/Footer.tsx +89 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +213 -173
- package/src/Prebuilt/components/Footer/RoleAccordion.jsx +78 -0
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +33 -10
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +38 -9
- package/src/Prebuilt/components/Header/{ConferencingHeader.jsx → Header.tsx} +9 -7
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +13 -4
- package/src/Prebuilt/components/Header/StreamActions.jsx +33 -60
- package/src/Prebuilt/components/Header/index.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +17 -3
- package/src/Prebuilt/components/InsetTile.tsx +122 -0
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +50 -18
- package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +19 -9
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
- package/src/Prebuilt/components/{LeaveCard.jsx → Leave/LeaveCard.tsx} +22 -3
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +63 -0
- package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +13 -5
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +38 -13
- package/src/Prebuilt/components/MetaActions.jsx +15 -23
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +12 -7
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +1 -1
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +1 -4
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +27 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/{DesktopOptions.jsx → DesktopOptions.tsx} +86 -75
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.jsx +20 -19
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +18 -11
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
- package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
- package/src/Prebuilt/components/{Pagination.jsx → Pagination.tsx} +35 -6
- package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
- package/src/Prebuilt/components/PostLeave.jsx +7 -7
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +5 -13
- package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +14 -4
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +9 -7
- package/src/Prebuilt/components/RaiseHand.jsx +0 -7
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +82 -6
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
- package/src/Prebuilt/components/ScreenshareTile.jsx +41 -33
- package/src/Prebuilt/components/SecondaryTiles.tsx +34 -0
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +2 -12
- package/src/Prebuilt/components/Settings/NotificationSettings.jsx +3 -9
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -9
- package/src/Prebuilt/components/StatsForNerds.jsx +3 -1
- package/src/Prebuilt/components/TileMenu/TileMenu.jsx +15 -16
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +21 -19
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +53 -11
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +62 -0
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +41 -0
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +92 -0
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +60 -0
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +56 -0
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +36 -0
- package/src/Prebuilt/components/VideoLayouts/interface.ts +9 -0
- package/src/Prebuilt/components/VideoTile.jsx +93 -43
- package/src/Prebuilt/components/conference.jsx +24 -20
- package/src/Prebuilt/components/hooks/useMetadata.jsx +7 -0
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +121 -0
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +22 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +5 -72
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +4 -45
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -17
- package/src/Prebuilt/components/peerTileUtils.jsx +1 -1
- package/src/Prebuilt/images/empty-chat.svg +12 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +17 -40
- package/src/Prebuilt/layouts/HLSView.jsx +83 -66
- package/src/Prebuilt/layouts/PDFView.jsx +1 -11
- package/src/Prebuilt/layouts/SidePane.tsx +96 -0
- package/src/Prebuilt/layouts/{mainView.jsx → VideoStreamingSection.tsx} +38 -47
- package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -4
- package/src/Prebuilt/plugins/whiteboard/{ToggleWhiteboard.jsx → ToggleWhiteboard.tsx} +5 -9
- package/src/Prebuilt/primitives/DialogContent.jsx +15 -11
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +17 -2
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +36 -13
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +10 -0
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +65 -0
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +17 -6
- package/dist/HLSView-CTAJQUU4.js.map +0 -7
- package/dist/PinnedTrackView-CQKONH4O.js +0 -102
- package/dist/PinnedTrackView-CQKONH4O.js.map +0 -7
- package/dist/VirtualBackground-GGGBJYVY.js.map +0 -7
- package/dist/chunk-I2FJWE74.js +0 -827
- package/dist/chunk-I2FJWE74.js.map +0 -7
- package/dist/chunk-L2SX7GBO.js.map +0 -7
- package/dist/chunk-NOKIGB6Y.js +0 -1100
- package/dist/chunk-NOKIGB6Y.js.map +0 -7
- package/dist/chunk-TJNDX446.js.map +0 -7
- package/dist/conference-OEO7VOJD.js +0 -8995
- package/dist/conference-OEO7VOJD.js.map +0 -7
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
- package/src/Prebuilt/components/EqualProminence.jsx +0 -180
- package/src/Prebuilt/components/FirstPersonDisplay.jsx +0 -50
- package/src/Prebuilt/components/Footer/Footer.jsx +0 -73
- package/src/Prebuilt/components/Header/Header.jsx +0 -8
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +0 -54
- package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
- package/src/Prebuilt/components/gridView.jsx +0 -85
- package/src/Prebuilt/components/hooks/useFeatures.js +0 -22
- package/src/Prebuilt/components/hooks/useNavigation.js +0 -19
- package/src/Prebuilt/components/hooks/useSkipPreview.jsx +0 -20
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +0 -29
- package/src/Prebuilt/images/Logo.svg +0 -8
- package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +0 -34
- package/src/Prebuilt/layouts/InsetView.jsx +0 -260
- package/src/Prebuilt/layouts/PinnedTrackView.jsx +0 -59
- package/src/Prebuilt/layouts/SidePane.jsx +0 -52
- package/src/Prebuilt/layouts/mainGridView.jsx +0 -98
- package/src/Prebuilt/layouts/screenShareView.jsx +0 -183
- /package/{src/Prebuilt/components/Header/index.jsx → dist/Prebuilt/components/Header/index.d.ts} +0 -0
- /package/src/Prebuilt/components/{ScreenShare.jsx → ScreenShareToggle.jsx} +0 -0
- /package/src/{assets → Prebuilt/images}/android-perm-1.png +0 -0
- /package/src/{assets → Prebuilt/images}/ios-perm-0.png +0 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { CSS } from '../../../Theme';
|
3
|
+
export declare const LeaveCard: ({ icon, title, subtitle, onClick, bg, titleColor, subtitleColor, css, }: {
|
4
|
+
icon: React.JSX.Element;
|
5
|
+
title: string;
|
6
|
+
subtitle: string;
|
7
|
+
onClick: () => void;
|
8
|
+
titleColor: string;
|
9
|
+
subtitleColor: string;
|
10
|
+
bg: string;
|
11
|
+
css?: CSS | undefined;
|
12
|
+
}) => React.JSX.Element;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ConferencingScreen } from '@100mslive/types-prebuilt';
|
3
|
+
export declare const MwebLeaveRoom: ({ leaveRoom, stopStream, screenType, }: {
|
4
|
+
leaveRoom: () => void;
|
5
|
+
stopStream: () => Promise<void>;
|
6
|
+
screenType: keyof ConferencingScreen;
|
7
|
+
}) => React.JSX.Element | null;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ConferencingScreen, DefaultConferencingScreen_Elements, HLSLiveStreamingScreen_Elements } from '@100mslive/types-prebuilt';
|
3
|
+
export declare const MoreSettings: ({ elements, screenType, }: {
|
4
|
+
elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;
|
5
|
+
screenType: keyof ConferencingScreen;
|
6
|
+
}) => React.JSX.Element;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ConferencingScreen, DefaultConferencingScreen_Elements, HLSLiveStreamingScreen_Elements } from '@100mslive/types-prebuilt';
|
3
|
+
export declare const DesktopOptions: ({ elements, screenType, }: {
|
4
|
+
elements: DefaultConferencingScreen_Elements & HLSLiveStreamingScreen_Elements;
|
5
|
+
screenType: keyof ConferencingScreen;
|
6
|
+
}) => React.JSX.Element;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare const PreviewForm: ({ name, onChange, onJoin, enableJoin, cannotPublishVideo, cannotPublishAudio, }: {
|
3
|
+
name: string;
|
4
|
+
onChange: (name: string) => void;
|
5
|
+
onJoin: () => void;
|
6
|
+
enableJoin: boolean;
|
7
|
+
cannotPublishVideo: boolean;
|
8
|
+
cannotPublishAudio: boolean;
|
9
|
+
}) => React.JSX.Element;
|
10
|
+
export default PreviewForm;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { GridVideoTileLayout } from '@100mslive/types-prebuilt/elements/video_tile_layout';
|
3
|
+
export declare type GridLayoutProps = GridVideoTileLayout & {
|
4
|
+
hide_participant_name_on_tile: boolean;
|
5
|
+
hide_audio_level_on_tile: boolean;
|
6
|
+
rounded_video_tile: boolean;
|
7
|
+
hide_audio_mute_on_tile: boolean;
|
8
|
+
video_object_fit: 'contain' | 'cover';
|
9
|
+
};
|
10
|
+
export declare const GridLayout: ({ enable_local_tile_inset: isInsetEnabled, prominent_roles: prominentRoles, enable_spotlighting_peer, hide_participant_name_on_tile, rounded_video_tile, hide_audio_mute_on_tile, video_object_fit, }: GridLayoutProps) => React.JSX.Element;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';
|
3
|
+
import { CSS } from '../../../Theme';
|
4
|
+
export declare const ProminenceLayout: {
|
5
|
+
Root: ({ children }: React.PropsWithChildren) => React.JSX.Element;
|
6
|
+
ProminentSection: ({ children, css }: React.PropsWithChildren<{
|
7
|
+
css?: CSS | undefined;
|
8
|
+
}>) => React.JSX.Element;
|
9
|
+
SecondarySection: ({ tiles, children }: React.PropsWithChildren<{
|
10
|
+
tiles: TrackWithPeerAndDimensions[];
|
11
|
+
}>) => React.JSX.Element;
|
12
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { HMSPeer, TrackWithPeerAndDimensions } from '@100mslive/react-sdk';
|
2
|
+
export declare const usePagesWithTiles: ({ peers, maxTileCount }: {
|
3
|
+
peers: HMSPeer[];
|
4
|
+
maxTileCount: number;
|
5
|
+
}) => TrackWithPeerAndDimensions[][];
|
6
|
+
export declare const useTileLayout: ({ pageList, maxTileCount, }: {
|
7
|
+
pageList: TrackWithPeerAndDimensions[][];
|
8
|
+
maxTileCount: number;
|
9
|
+
}) => {
|
10
|
+
pagesWithTiles: TrackWithPeerAndDimensions[][];
|
11
|
+
ref: import("react-use/lib/useMeasure").UseMeasureRef<HTMLDivElement>;
|
12
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare type TileContextType = {
|
3
|
+
enableSpotlightingPeer: boolean;
|
4
|
+
hideParticipantNameOnTile?: boolean;
|
5
|
+
roundedVideoTile?: boolean;
|
6
|
+
hideAudioMuteOnTile?: boolean;
|
7
|
+
objectFit?: 'cover' | 'contain';
|
8
|
+
};
|
9
|
+
export declare const VideoTileContext: React.Context<TileContextType>;
|
10
|
+
export declare const useVideoTileContext: () => TileContextType;
|
11
|
+
export {};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ConferencingScreen, DefaultConferencingScreen_Elements, HLSLiveStreamingScreen_Elements } from '@100mslive/types-prebuilt';
|
3
|
+
export declare const VideoStreamingSection: ({ screenType, elements, }: {
|
4
|
+
screenType: keyof ConferencingScreen;
|
5
|
+
elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;
|
6
|
+
}) => React.JSX.Element | null;
|
@@ -5,5 +5,6 @@ export declare type useFetchRoomLayoutProps = {
|
|
5
5
|
};
|
6
6
|
export declare type useFetchRoomLayoutResponse = {
|
7
7
|
layout: Layout | undefined;
|
8
|
+
updateRoomLayoutForRole: (role: string) => void;
|
8
9
|
};
|
9
10
|
export declare const useFetchRoomLayout: ({ endpoint, authToken, }: useFetchRoomLayoutProps) => useFetchRoomLayoutResponse;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useInsetEnabled: () => boolean;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ConferencingScreen, DefaultPreviewScreen_Elements, Screens } from '@100mslive/types-prebuilt';
|
2
|
+
export declare type useRoomLayoutScreenProps = {
|
3
|
+
screen: keyof Screens;
|
4
|
+
};
|
5
|
+
export declare function useRoomLayoutPreviewScreen(): {
|
6
|
+
isPreviewScreenEnabled: boolean;
|
7
|
+
elements: DefaultPreviewScreen_Elements | undefined;
|
8
|
+
screenType: "default" | undefined;
|
9
|
+
};
|
10
|
+
export declare function useRoomLayoutConferencingScreen(): {
|
11
|
+
hideSections: string[];
|
12
|
+
elements: import("@100mslive/types-prebuilt").DefaultConferencingScreen_Elements | import("@100mslive/types-prebuilt").HLSLiveStreamingScreen_Elements | undefined;
|
13
|
+
screenType: keyof ConferencingScreen;
|
14
|
+
};
|
15
|
+
export declare function useRoomLayoutLeaveScreen(): {
|
16
|
+
isLeaveScreenEnabled: boolean;
|
17
|
+
};
|
@@ -1,9 +1,14 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { Layout } from '@100mslive/types-prebuilt';
|
3
|
+
import { useFetchRoomLayoutResponse } from './hooks/useFetchRoomLayout';
|
3
4
|
export declare type RoomLayoutProviderProps = {
|
4
5
|
roomLayoutEndpoint?: string;
|
5
6
|
overrideLayout?: Partial<Layout>;
|
6
7
|
};
|
7
|
-
export declare const RoomLayoutContext: React.Context<
|
8
|
+
export declare const RoomLayoutContext: React.Context<{
|
9
|
+
layout: Layout | undefined;
|
10
|
+
updateRoomLayoutForRole: useFetchRoomLayoutResponse['updateRoomLayoutForRole'] | undefined;
|
11
|
+
} | undefined>;
|
8
12
|
export declare const RoomLayoutProvider: React.FC<React.PropsWithChildren<RoomLayoutProviderProps>>;
|
9
13
|
export declare const useRoomLayout: () => Layout | undefined;
|
14
|
+
export declare const useUpdateRoomLayout: () => ((role: string) => void) | undefined;
|
@@ -1,18 +1,14 @@
|
|
1
1
|
import {
|
2
2
|
ActionTile
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-E2M2ZSOL.js";
|
4
4
|
import {
|
5
|
-
FEATURE_LIST,
|
6
5
|
IconButton_default,
|
7
6
|
Loading,
|
8
7
|
Tooltip,
|
9
|
-
__async
|
10
|
-
|
11
|
-
useIsFeatureEnabled
|
12
|
-
} from "./chunk-NOKIGB6Y.js";
|
8
|
+
__async
|
9
|
+
} from "./chunk-GQD2AGWW.js";
|
13
10
|
|
14
11
|
// src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx
|
15
|
-
init_define_process_env();
|
16
12
|
import React, { useEffect, useRef, useState } from "react";
|
17
13
|
import { HMSVirtualBackgroundTypes as HMSVirtualBackgroundTypes2 } from "@100mslive/hms-virtual-background";
|
18
14
|
import {
|
@@ -26,7 +22,6 @@ import {
|
|
26
22
|
import { VirtualBackgroundIcon } from "@100mslive/react-icons";
|
27
23
|
|
28
24
|
// src/Prebuilt/plugins/VirtualBackground/vbutils.js
|
29
|
-
init_define_process_env();
|
30
25
|
import { HMSVirtualBackgroundTypes } from "@100mslive/hms-virtual-background";
|
31
26
|
function getRandomVirtualBackground() {
|
32
27
|
const backgroundList = [
|
@@ -94,7 +89,6 @@ var VirtualBackground = ({
|
|
94
89
|
const [isVBOn, setIsVBOn] = useState(false);
|
95
90
|
const localPeerVideoTrackID = useHMSStore(selectLocalVideoTrackID);
|
96
91
|
const isVBPresent = useHMSStore(selectIsLocalVideoPluginPresent("HMSVB"));
|
97
|
-
const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.VIDEO_PLUGINS);
|
98
92
|
function createPlugin() {
|
99
93
|
return __async(this, null, function* () {
|
100
94
|
if (!pluginRef.current) {
|
@@ -135,7 +129,7 @@ var VirtualBackground = ({
|
|
135
129
|
}
|
136
130
|
});
|
137
131
|
}
|
138
|
-
if (!isAllowedToPublish.video || !isVBSupported
|
132
|
+
if (!isAllowedToPublish.video || !isVBSupported) {
|
139
133
|
return null;
|
140
134
|
}
|
141
135
|
if (asActionTile) {
|
@@ -180,4 +174,4 @@ export {
|
|
180
174
|
VirtualBackground,
|
181
175
|
VirtualBackground_default as default
|
182
176
|
};
|
183
|
-
//# sourceMappingURL=VirtualBackground-
|
177
|
+
//# sourceMappingURL=VirtualBackground-AYDHYLIZ.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx", "../src/Prebuilt/plugins/VirtualBackground/vbutils.js"],
|
4
|
+
"sourcesContent": ["import React, { useEffect, useRef, useState } from 'react';\nimport { HMSVirtualBackgroundTypes } from '@100mslive/hms-virtual-background';\nimport {\n selectIsAllowedToPublish,\n selectIsLocalVideoPluginPresent,\n selectLocalPeerRole,\n selectLocalVideoTrackID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { VirtualBackgroundIcon } from '@100mslive/react-icons';\nimport { ActionTile } from '../../components/MoreSettings/ActionTile';\nimport { Loading } from '../../../Loading';\nimport { Tooltip } from '../../../Tooltip';\nimport IconButton from '../../IconButton';\nimport { getRandomVirtualBackground } from './vbutils';\n\nexport const VirtualBackground = ({\n asActionTile = false,\n onVBClick = () => {\n return;\n },\n}) => {\n const pluginRef = useRef(null);\n const hmsActions = useHMSActions();\n const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);\n const role = useHMSStore(selectLocalPeerRole);\n const [isVBLoading, setIsVBLoading] = useState(false);\n const [isVBSupported, setIsVBSupported] = useState(false);\n const [isVBOn, setIsVBOn] = useState(false);\n const localPeerVideoTrackID = useHMSStore(selectLocalVideoTrackID);\n const isVBPresent = useHMSStore(selectIsLocalVideoPluginPresent('HMSVB'));\n\n async function createPlugin() {\n if (!pluginRef.current) {\n const { HMSVBPlugin } = await import('@100mslive/hms-virtual-background');\n pluginRef.current = new HMSVBPlugin(HMSVirtualBackgroundTypes.NONE, HMSVirtualBackgroundTypes.NONE);\n }\n }\n useEffect(() => {\n if (!localPeerVideoTrackID) {\n return;\n }\n createPlugin().then(() => {\n //check support of plugin\n const pluginSupport = hmsActions.validateVideoPluginSupport(pluginRef.current);\n setIsVBSupported(pluginSupport.isSupported);\n });\n }, [hmsActions, localPeerVideoTrackID]);\n\n async function addPlugin() {\n setIsVBLoading(true);\n try {\n await createPlugin();\n window.HMS.virtualBackground = pluginRef.current;\n const { background, backgroundType } = getRandomVirtualBackground();\n await pluginRef.current.setBackground(background, backgroundType);\n await hmsActions.addPluginToVideoTrack(pluginRef.current, Math.floor(role.publishParams.video.frameRate / 2));\n } catch (err) {\n console.error('add virtual background plugin failed', err);\n }\n setIsVBLoading(false);\n }\n\n async function removePlugin() {\n if (pluginRef.current) {\n await hmsActions.removePluginFromVideoTrack(pluginRef.current);\n pluginRef.current = null;\n }\n }\n\n if (!isAllowedToPublish.video || !isVBSupported) {\n return null;\n }\n if (asActionTile) {\n return (\n <ActionTile.Root\n data-testid=\"virtual_bg_btn\"\n active={isVBPresent}\n disabled={isVBLoading}\n onClick={() => {\n setIsVBOn(!isVBOn);\n !isVBPresent ? addPlugin() : removePlugin();\n onVBClick();\n }}\n >\n <VirtualBackgroundIcon />\n <ActionTile.Title>Virtual Background</ActionTile.Title>\n </ActionTile.Root>\n );\n }\n\n return (\n <Tooltip\n boxCss={{ zIndex: '100' }}\n title={isVBLoading ? 'Adding virtual background' : `Turn ${!isVBPresent ? 'on' : 'off'} virtual background`}\n >\n <IconButton\n active={!isVBPresent}\n disabled={isVBLoading}\n onClick={() => {\n !isVBPresent ? addPlugin() : removePlugin();\n }}\n data-testid=\"virtual_bg_btn\"\n >\n {isVBLoading ? <Loading /> : <VirtualBackgroundIcon />}\n </IconButton>\n </Tooltip>\n );\n};\n\nexport default VirtualBackground;\n", "/* eslint-disable no-case-declarations */\nimport { HMSVirtualBackgroundTypes } from '@100mslive/hms-virtual-background';\nexport function getRandomVirtualBackground() {\n const backgroundList = [\n {\n background: HMSVirtualBackgroundTypes.BLUR,\n backgroundType: HMSVirtualBackgroundTypes.BLUR,\n },\n ];\n\n const images = [\n 'https://www.100ms.live/images/vb-1.jpeg',\n 'https://www.100ms.live/images/vb-2.jpg',\n 'https://www.100ms.live/images/vb-3.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms1.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms2.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms3.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms4.png',\n ].map(url => ({\n background: url,\n backgroundType: HMSVirtualBackgroundTypes.IMAGE,\n }));\n\n backgroundList.push(...images);\n\n /* \n //TODO: update with a better quality gif.\n const gifList = [\n {\n background: \"https://www.100ms.live/images/vb-1.gif\",\n backgroundType: HMSVirtualBackgroundTypes.GIF,\n },\n ];\n backgroundList.push(...gifList); \n */\n\n const videoList = [\n 'https://www.100ms.live/images/video-1.mp4',\n 'https://www.100ms.live/images/video-2.mp4',\n 'https://www.100ms.live/images/video-5.mp4',\n 'https://www.100ms.live/images/video-7.mp4',\n 'https://www.100ms.live/images/video-8.mp4',\n ].map(url => ({\n background: url,\n backgroundType: HMSVirtualBackgroundTypes.VIDEO,\n }));\n backgroundList.push(...videoList);\n\n const randomIdx = Math.floor(Math.random() * backgroundList.length);\n const virtualBackground = backgroundList[randomIdx];\n switch (virtualBackground.backgroundType) {\n case HMSVirtualBackgroundTypes.IMAGE:\n const img = document.createElement('img');\n img.alt = 'VB';\n img.src = backgroundList[randomIdx].background;\n virtualBackground.background = img;\n return virtualBackground;\n case HMSVirtualBackgroundTypes.VIDEO:\n const videoEl = document.createElement('video');\n videoEl.src = backgroundList[randomIdx].background;\n virtualBackground.background = videoEl;\n return virtualBackground;\n default:\n return virtualBackground;\n }\n}\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;AAAA,OAAO,SAAS,WAAW,QAAQ,gBAAgB;AACnD,SAAS,6BAAAA,kCAAiC;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;;;ACTtC,SAAS,iCAAiC;AACnC,SAAS,6BAA6B;AAC3C,QAAM,iBAAiB;AAAA,IACrB;AAAA,MACE,YAAY,0BAA0B;AAAA,MACtC,gBAAgB,0BAA0B;AAAA,IAC5C;AAAA,EACF;AAEA,QAAM,SAAS;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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aAAa;AAC1C,oBAAU;AAAA,QACZ;AAAA;AAAA,MAEA,oCAAC,2BAAsB;AAAA,MACvB,oCAAC,WAAW,OAAX,MAAiB,oBAAkB;AAAA,IACtC;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ,EAAE,QAAQ,MAAM;AAAA,MACxB,OAAO,cAAc,8BAA8B,QAAQ,CAAC,cAAc,OAAO,KAAK;AAAA;AAAA,IAEtF;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC;AAAA,QACT,UAAU;AAAA,QACV,SAAS,MAAM;AACb,WAAC,cAAc,UAAU,IAAI,aAAa;AAAA,QAC5C;AAAA,QACA,eAAY;AAAA;AAAA,MAEX,cAAc,oCAAC,aAAQ,IAAK,oCAAC,2BAAsB;AAAA,IACtD;AAAA,EACF;AAEJ;AAEA,IAAO,4BAAQ;",
|
6
|
+
"names": ["HMSVirtualBackgroundTypes", "HMSVirtualBackgroundTypes"]
|
7
|
+
}
|
@@ -4,12 +4,10 @@ import {
|
|
4
4
|
__objRest,
|
5
5
|
__spreadProps,
|
6
6
|
__spreadValues,
|
7
|
-
init_define_process_env,
|
8
7
|
styled
|
9
|
-
} from "./chunk-
|
8
|
+
} from "./chunk-GQD2AGWW.js";
|
10
9
|
|
11
10
|
// src/Prebuilt/components/MoreSettings/ActionTile.jsx
|
12
|
-
init_define_process_env();
|
13
11
|
import React from "react";
|
14
12
|
var ActionTileRoot = (_a) => {
|
15
13
|
var _b = _a, { active, disabled = false, children, onClick } = _b, props = __objRest(_b, ["active", "disabled", "children", "onClick"]);
|
@@ -45,9 +43,14 @@ var ActionTileCount = styled(Text, {
|
|
45
43
|
fontWeight: "$semiBold",
|
46
44
|
color: "$on_surface_high",
|
47
45
|
p: "$1 $2",
|
46
|
+
minWidth: "$9",
|
47
|
+
textAlign: "center",
|
48
|
+
boxSizing: "border-box",
|
48
49
|
bg: "$surface_bright",
|
49
50
|
r: "$round",
|
50
|
-
|
51
|
+
letterSpacing: "1.5px",
|
52
|
+
fontSize: "$tiny !important",
|
53
|
+
lineHeight: "$tiny !important"
|
51
54
|
});
|
52
55
|
var ActionTileTitle = styled(Text, {
|
53
56
|
fontWeight: "$semiBold",
|
@@ -64,4 +67,4 @@ var ActionTile = {
|
|
64
67
|
export {
|
65
68
|
ActionTile
|
66
69
|
};
|
67
|
-
//# sourceMappingURL=chunk-
|
70
|
+
//# sourceMappingURL=chunk-E2M2ZSOL.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/Prebuilt/components/MoreSettings/ActionTile.jsx"],
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { styled } from '../../../Theme';\n\nconst ActionTileRoot = ({ active, disabled = false, children, onClick, ...props }) => (\n <Flex\n {...props}\n css={{\n flexDirection: 'column',\n alignItems: 'center',\n p: '$4 $2',\n position: 'relative',\n bg: active ? '$surface_bright' : '',\n color: disabled ? '$on_surface_low' : '$on_surface_high',\n gap: '$4',\n r: '$1',\n '&:hover': {\n bg: '$surface_bright',\n },\n }}\n onClick={() => {\n if (!disabled) {\n onClick();\n }\n }}\n >\n {children}\n </Flex>\n);\n\nconst ActionTileCount = styled(Text, {\n position: 'absolute',\n top: 0,\n right: 0,\n fontWeight: '$semiBold',\n color: '$on_surface_high',\n p: '$1 $2',\n minWidth: '$9',\n textAlign: 'center',\n boxSizing: 'border-box',\n bg: '$surface_bright',\n r: '$round',\n letterSpacing: '1.5px',\n fontSize: '$tiny !important',\n lineHeight: '$tiny !important',\n});\n\nconst ActionTileTitle = styled(Text, {\n fontWeight: '$semiBold',\n color: 'inherit',\n textAlign: 'center',\n fontSize: '$xs !important',\n});\n\nexport const ActionTile = {\n Root: ActionTileRoot,\n Title: ActionTileTitle,\n Count: ActionTileCount,\n};\n"],
|
5
|
+
"mappings": ";;;;;;;;;;AAAA,OAAO,WAAW;AAKlB,IAAM,iBAAiB,CAAC,OAA2D;AAA3D,eAAE,UAAQ,WAAW,OAAO,UAAU,QAL9D,IAKwB,IAAkD,kBAAlD,IAAkD,CAAhD,UAAQ,YAAkB,YAAU;AAC5D;AAAA,IAAC;AAAA,qCACK,QADL;AAAA,MAEC,KAAK;AAAA,QACH,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,GAAG;AAAA,QACH,UAAU;AAAA,QACV,IAAI,SAAS,oBAAoB;AAAA,QACjC,OAAO,WAAW,oBAAoB;AAAA,QACtC,KAAK;AAAA,QACL,GAAG;AAAA,QACH,WAAW;AAAA,UACT,IAAI;AAAA,QACN;AAAA,MACF;AAAA,MACA,SAAS,MAAM;AACb,YAAI,CAAC,UAAU;AACb,kBAAQ;AAAA,QACV;AAAA,MACF;AAAA;AAAA,IAEC;AAAA,EACH;AAAA;AAGF,IAAM,kBAAkB,OAAO,MAAM;AAAA,EACnC,UAAU;AAAA,EACV,KAAK;AAAA,EACL,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,GAAG;AAAA,EACH,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,eAAe;AAAA,EACf,UAAU;AAAA,EACV,YAAY;AACd,CAAC;AAED,IAAM,kBAAkB,OAAO,MAAM;AAAA,EACnC,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AACZ,CAAC;AAEM,IAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AACT;",
|
6
|
+
"names": []
|
7
|
+
}
|