@100mslive/roomkit-react 0.2.7-alpha.0 → 0.2.7-alpha.2
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-DQJBCEW4.js} +2 -2
- package/dist/Prebuilt/common/constants.d.ts +4 -3
- package/dist/Prebuilt/components/AudioVideoToggle.d.ts +9 -0
- package/dist/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.d.ts +11 -0
- package/dist/Prebuilt/components/hooks/useAudioOutputTest.d.ts +8 -0
- package/dist/{chunk-DWLYDCFC.js → chunk-GEXL6KL2.js} +4355 -3936
- package/dist/chunk-GEXL6KL2.js.map +7 -0
- package/dist/index.cjs.js +5991 -5566
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +668 -599
- package/dist/meta.esbuild.json +675 -606
- package/package.json +7 -6
- package/src/Prebuilt/common/constants.ts +7 -4
- package/src/Prebuilt/components/AppData/useUISettings.js +1 -1
- package/src/Prebuilt/components/AudioVideoToggle.tsx +308 -0
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +0 -1
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +159 -0
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +0 -2
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +13 -2
- package/src/Prebuilt/components/Notifications/Notifications.tsx +1 -18
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +10 -17
- package/src/Prebuilt/components/hooks/useAudioOutputTest.tsx +20 -0
- package/dist/chunk-DWLYDCFC.js.map +0 -7
- package/src/Prebuilt/components/AudioVideoToggle.jsx +0 -171
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +0 -121
- /package/dist/{HLSView-E65JZSU4.js.map → HLSView-DQJBCEW4.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-GEXL6KL2.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-DQJBCEW4.js.map
|
@@ -84,9 +84,9 @@ export declare const SUBSCRIBED_NOTIFICATIONS: {
|
|
84
84
|
export declare const CREATE_ROOM_DOC_URL = "https://github.com/100mslive/100ms-web/wiki/Creating-and-joining-a-room";
|
85
85
|
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
86
|
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;
|
87
|
+
export declare const isChrome: boolean | undefined;
|
88
|
+
export declare const isFirefox: boolean | undefined;
|
89
|
+
export declare const isSafari: boolean | undefined;
|
90
90
|
export declare const isIOS: boolean;
|
91
91
|
export declare const isMacOS: boolean;
|
92
92
|
export declare const isAndroid: boolean;
|
@@ -114,3 +114,4 @@ export declare enum QUESTION_TYPE {
|
|
114
114
|
}
|
115
115
|
export declare const ROLE_CHANGE_DECLINED = "role_change_declined";
|
116
116
|
export declare const DEFAULT_PORTAL_CONTAINER = ".prebuilt-container";
|
117
|
+
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;
|
@@ -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
|
+
};
|