@100mslive/roomkit-react 0.2.7-alpha.0 → 0.2.7-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +30 -33
- package/dist/{HLSView-E65JZSU4.js → HLSView-4B5MUDFR.js} +2 -2
- package/dist/Prebuilt/common/constants.d.ts +4 -8
- package/dist/Prebuilt/components/AudioVideoToggle.d.ts +9 -0
- package/dist/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.d.ts +11 -0
- package/dist/Prebuilt/components/Polls/common/utils.d.ts +1 -1
- package/dist/Prebuilt/components/hooks/useAudioOutputTest.d.ts +8 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +0 -5
- package/dist/{chunk-DWLYDCFC.js → chunk-KST24BRA.js} +5297 -5064
- package/dist/chunk-KST24BRA.js.map +7 -0
- package/dist/index.cjs.js +6302 -6130
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +745 -1109
- package/dist/meta.esbuild.json +761 -1125
- package/package.json +8 -7
- package/src/Prebuilt/App.tsx +0 -2
- package/src/Prebuilt/common/constants.ts +7 -10
- package/src/Prebuilt/components/AppData/AppData.tsx +0 -1
- package/src/Prebuilt/components/AppData/useUISettings.js +1 -1
- package/src/Prebuilt/components/AudioVideoToggle.tsx +308 -0
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +1 -0
- package/src/Prebuilt/components/Header/Header.tsx +0 -2
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +159 -0
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +0 -2
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +2 -18
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +13 -2
- package/src/Prebuilt/components/Notifications/Notifications.tsx +1 -18
- package/src/Prebuilt/components/Polls/common/utils.ts +9 -15
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +10 -17
- package/src/Prebuilt/components/hooks/useAudioOutputTest.tsx +20 -0
- package/src/Prebuilt/layouts/SidePane.tsx +0 -4
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +0 -40
- package/dist/Prebuilt/components/AppData/useSheet.d.ts +0 -4
- package/dist/Prebuilt/components/Header/RoomDetailsHeader.d.ts +0 -2
- package/dist/Prebuilt/components/RoomDetails/Duration.d.ts +0 -4
- package/dist/Prebuilt/components/RoomDetails/RoomDetailsPane.d.ts +0 -2
- package/dist/Prebuilt/components/RoomDetails/RoomDetailsRow.d.ts +0 -4
- package/dist/Prebuilt/components/RoomDetails/RoomDetailsSheet.d.ts +0 -2
- package/dist/Prebuilt/layouts/Sheet.d.ts +0 -2
- package/dist/chunk-DWLYDCFC.js.map +0 -7
- package/src/Prebuilt/components/AppData/useSheet.ts +0 -33
- package/src/Prebuilt/components/AudioVideoToggle.jsx +0 -171
- package/src/Prebuilt/components/Header/RoomDetailsHeader.tsx +0 -51
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +0 -121
- package/src/Prebuilt/components/RoomDetails/Duration.tsx +0 -26
- package/src/Prebuilt/components/RoomDetails/RoomDetailsPane.tsx +0 -36
- package/src/Prebuilt/components/RoomDetails/RoomDetailsRow.tsx +0 -23
- package/src/Prebuilt/components/RoomDetails/RoomDetailsSheet.tsx +0 -45
- package/src/Prebuilt/layouts/Sheet.tsx +0 -14
- /package/dist/{HLSView-E65JZSU4.js.map → HLSView-4B5MUDFR.js.map} +0 -0
package/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
|
2
|
+
![Banner](https://github.com/100mslive/web-sdks/blob/06c65259912db6ccd8617f2ecb6fef51429251ec/prebuilt-banner.png)
|
1
3
|
# Room Kit React Library
|
2
4
|
|
5
|
+
|
3
6
|
100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.
|
4
7
|
|
5
8
|
## Installation
|
@@ -40,42 +43,30 @@ export default App() {
|
|
40
43
|
|
41
44
|
For additional props, refer the [docs](https://www.100ms.live/docs/javascript/v2/quickstart/prebuilt-quickstart#props-for-hmsprebuilt)
|
42
45
|
|
46
|
+
## Cutomization
|
47
|
+
While we offer [a no-code way to customize Prebuilt](https://www.100ms.live/docs/get-started/v2/get-started/prebuilt/overview#customize-prebuilt), you can fork your copy of the Prebuilt component and make changes to the code to allow for more fine-tuning.
|
43
48
|
|
44
49
|
Prebuilt customisations are available on [100ms dashboard](https://dashboard.100ms.live)
|
45
50
|
|
46
|
-
|
47
|
-
#### Understanding the flow:
|
51
|
+
### Understanding the Structure
|
48
52
|
|
49
53
|
The `src` folder contains all the components, `Button`, `Accordion` etc.
|
50
|
-
The `Prebuilt` folder contains the full
|
51
|
-
`App.tsx` is the entry point for the
|
52
|
-
|
53
|
-
**Major Components in Prebuilt:**
|
54
|
-
|
55
|
-
[RoomLayoutProvider](src/Prebuilt/provider/roomLayoutProvider/index.tsx)
|
56
|
-
This is a context that contains the configuration from the dashboard [customiser](dashboard.100ms.live). Whatever changes are made in the dashboard customiser are available the next time you join.
|
57
|
-
|
58
|
-
[AppStateContext](src/Prebuilt/AppStateContext.tsx)
|
59
|
-
Contains the logic to switch between different screens, for example, Preview to Meeting, Meeting to Leave.
|
60
|
-
These transitions are based on the roomState that is available from the reactive store(`useHMSStore(selectHMSRoomState)`)
|
61
|
-
|
62
|
-
[PreviewScreen](src/Prebuilt/components/Preview/PreviewScreen.tsx)
|
54
|
+
The `Prebuilt` folder contains the full Prebuilt implementation.
|
55
|
+
`App.tsx` is the entry point for the Prebuilt which contains the `HMSPrebuilt` component.
|
63
56
|
|
64
|
-
|
57
|
+
### Major Components in Prebuilt
|
65
58
|
|
66
|
-
|
59
|
+
| Component | Description |
|
60
|
+
|--|--|
|
61
|
+
| [RoomLayoutProvider](src/Prebuilt/provider/roomLayoutProvider/index.tsx) | This is a context that contains the configuration from the dashboard [customiser](dashboard.100ms.live). Whatever changes are made in the dashboard customiser are available the next time you join.|
|
62
|
+
|[AppStateContext](src/Prebuilt/AppStateContext.tsx) | Contains the logic to switch between different screens, for example, Preview to Meeting, Meeting to Leave. These transitions are based on the roomState that is available from the reactive store (`useHMSStore(selectHMSRoomState)`). |
|
63
|
+
| [PreviewScreen](src/Prebuilt/components/Preview/PreviewScreen.tsx) | Contains the Preview implementation. Contains the Video tile, video, audio toggles and Virtual background and settings along with the name input.|
|
64
|
+
| [ConferenceScreen](src/Prebuilt/components/ConferenceScreen.tsx) | This contains the screen once you finish Preview and enter the meeting. This contains the header and footer and the main content.|
|
65
|
+
| [VideoStreamingSection](src/Prebuilt/layouts/VideoStreamingSection.tsx) |This is the component that contains the main video rendering components and a sidebar (Interactive features like Chat and Polls are displayed here) |
|
66
|
+
| [LeaveScreen](src/Prebuilt/components/LeaveScreen.tsx) |This is the screen that is shown when you leave the meeting |
|
67
67
|
|
68
|
-
This contains the screen once you finish Preview and enter the meeting. This contains the header and footer and the main content.
|
69
68
|
|
70
|
-
|
71
|
-
|
72
|
-
This is the component that contains the main video rendering components and a sidebar(Chat, Polls, and Others are shown here)
|
73
|
-
|
74
|
-
[LeaveScreen](src/Prebuilt/components/LeaveScreen.tsx)
|
75
|
-
|
76
|
-
This is the screen that is shown when you leave the meeting
|
77
|
-
|
78
|
-
#### Customising the styles:
|
69
|
+
### Customising the Styles
|
79
70
|
|
80
71
|
[Base Config](/src/Theme/base.config.ts) has all the variables that you can use. Any changes you want for the theme can be made here. Most likely no additional changes will be required unless you want to introduce new variables.
|
81
72
|
|
@@ -84,14 +75,20 @@ When [`HMSThemeProvider`](src/Theme/ThemeProvider.tsx) is used at the top level,
|
|
84
75
|
For components created using the base components like `Box`, `Flex`, `Button` etc, css Prop is available to modify the styles. Within the css prop, you can access the variables from the [base config](/src/Theme/base.config.ts).
|
85
76
|
|
86
77
|
|
87
|
-
|
78
|
+
## Contributing
|
79
|
+
|
80
|
+
- Make sure whatever new Component/file you create is in `Typescript`.
|
81
|
+
|
82
|
+
- Don't forget to add data-testid for actionables like buttons, menus etc.
|
88
83
|
|
89
|
-
|
84
|
+
- Setup proper tooling ([ESLint](https://eslint.org/) and [Prettier](https://prettier.io/)) in your editor.
|
90
85
|
|
91
|
-
|
86
|
+
- `yarn lint` will be run before you push the changes, so whenever a push fails, check if there are any lint errors.
|
92
87
|
|
93
|
-
|
88
|
+
Read this [doc](../../DEVELOPER.MD) for the coding guidelines.
|
94
89
|
|
95
|
-
|
90
|
+
## Community & Support
|
96
91
|
|
97
|
-
|
92
|
+
- [GitHub Issues](https://github.com/100mslive/web-sdks/issues) - Submit any bugs or errors you encounter using the Web SDKs.
|
93
|
+
- [Discord](https://discord.com/invite/kGdmszyzq2) - Hang out with the community members, share your projects or ask questions to get help from the 100ms team.
|
94
|
+
- [Contact](https://www.100ms.live/contact) - Reach out to 100ms team to get pricing information, understand how we can help you go live, or to learn more about the platform.
|
@@ -23,7 +23,7 @@ import {
|
|
23
23
|
styled,
|
24
24
|
usePollViewToggle,
|
25
25
|
useTheme
|
26
|
-
} from "./chunk-
|
26
|
+
} from "./chunk-KST24BRA.js";
|
27
27
|
|
28
28
|
// src/Prebuilt/layouts/HLSView.jsx
|
29
29
|
init_define_process_env();
|
@@ -984,4 +984,4 @@ var HLSView_default = HLSView;
|
|
984
984
|
export {
|
985
985
|
HLSView_default as default
|
986
986
|
};
|
987
|
-
//# sourceMappingURL=HLSView-
|
987
|
+
//# sourceMappingURL=HLSView-4B5MUDFR.js.map
|
@@ -42,7 +42,6 @@ export declare const APP_DATA: {
|
|
42
42
|
disableNotifications: string;
|
43
43
|
pollState: string;
|
44
44
|
background: string;
|
45
|
-
sheet: string;
|
46
45
|
};
|
47
46
|
export declare const UI_SETTINGS: {
|
48
47
|
isAudioOnly: string;
|
@@ -59,10 +58,6 @@ export declare const SIDE_PANE_OPTIONS: {
|
|
59
58
|
STREAMING: string;
|
60
59
|
POLLS: string;
|
61
60
|
VB: string;
|
62
|
-
ROOM_DETAILS: string;
|
63
|
-
};
|
64
|
-
export declare const SHEET_OPTIONS: {
|
65
|
-
ROOM_DETAILS: string;
|
66
61
|
};
|
67
62
|
export declare const POLL_STATE: {
|
68
63
|
pollInView: string;
|
@@ -84,9 +79,9 @@ export declare const SUBSCRIBED_NOTIFICATIONS: {
|
|
84
79
|
export declare const CREATE_ROOM_DOC_URL = "https://github.com/100mslive/100ms-web/wiki/Creating-and-joining-a-room";
|
85
80
|
export declare const HLS_TIMED_METADATA_DOC_URL = "https://www.100ms.live/docs/javascript/v2/how--to-guides/record-and-live-stream/hls/hls-timed-metadata";
|
86
81
|
export declare const REMOTE_STOP_SCREENSHARE_TYPE = "REMOTE_STOP_SCREENSHARE";
|
87
|
-
export declare const isChrome: boolean;
|
88
|
-
export declare const isFirefox: boolean;
|
89
|
-
export declare const isSafari: boolean;
|
82
|
+
export declare const isChrome: boolean | undefined;
|
83
|
+
export declare const isFirefox: boolean | undefined;
|
84
|
+
export declare const isSafari: boolean | undefined;
|
90
85
|
export declare const isIOS: boolean;
|
91
86
|
export declare const isMacOS: boolean;
|
92
87
|
export declare const isAndroid: boolean;
|
@@ -114,3 +109,4 @@ export declare enum QUESTION_TYPE {
|
|
114
109
|
}
|
115
110
|
export declare const ROLE_CHANGE_DECLINED = "role_change_declined";
|
116
111
|
export declare const DEFAULT_PORTAL_CONTAINER = ".prebuilt-container";
|
112
|
+
export declare const TEST_AUDIO_URL = "https://100ms.live/test-audio.wav";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export declare const Options: ({ options, selectedDeviceId, onClick, }: {
|
3
|
+
options?: (MediaDeviceInfo | InputDeviceInfo)[] | undefined;
|
4
|
+
selectedDeviceId?: string | undefined;
|
5
|
+
onClick: (deviceId: string) => Promise<void>;
|
6
|
+
}) => React.JSX.Element;
|
7
|
+
export declare const AudioVideoToggle: ({ hideOptions }: {
|
8
|
+
hideOptions?: boolean | undefined;
|
9
|
+
}) => React.JSX.Element | null;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export declare const IconButtonWithOptions: ({ disabled, onDisabledClick, tooltipMessage, icon, children, active, hideOptions, onClick, }: {
|
3
|
+
onClick: () => void;
|
4
|
+
onDisabledClick: () => void;
|
5
|
+
icon: React.ReactNode;
|
6
|
+
children: React.ReactNode;
|
7
|
+
hideOptions?: boolean | undefined;
|
8
|
+
active: boolean;
|
9
|
+
disabled?: boolean | undefined;
|
10
|
+
tooltipMessage?: string | undefined;
|
11
|
+
}) => React.JSX.Element;
|
@@ -1 +1 @@
|
|
1
|
-
export declare const getFormattedTime: (milliseconds: number | undefined
|
1
|
+
export declare const getFormattedTime: (milliseconds: number | undefined) => string;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const useAudioOutputTest: ({ deviceId }: {
|
3
|
+
deviceId: string;
|
4
|
+
}) => {
|
5
|
+
playing: boolean;
|
6
|
+
setPlaying: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
7
|
+
audioRef: import("react").MutableRefObject<HTMLAudioElement | null>;
|
8
|
+
};
|
@@ -16,8 +16,3 @@ export declare function useRoomLayoutConferencingScreen(): {
|
|
16
16
|
export declare function useRoomLayoutLeaveScreen(): {
|
17
17
|
isLeaveScreenEnabled: boolean;
|
18
18
|
};
|
19
|
-
export declare function useRoomLayoutHeader(): {
|
20
|
-
title: string;
|
21
|
-
description: string;
|
22
|
-
details: (string | Date)[];
|
23
|
-
};
|