@100mslive/react-native-room-kit 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/HMSRoomSetup.js +1 -1
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone.png +0 -0
- package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
- package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
- package/lib/commonjs/Icons/AnswerPhone/index.js +30 -0
- package/lib/commonjs/Icons/AnswerPhone/index.js.map +1 -0
- package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
- package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
- package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
- package/lib/commonjs/Icons/Bluetooth/index.js +30 -0
- package/lib/commonjs/Icons/Bluetooth/index.js.map +1 -0
- package/lib/commonjs/Icons/GenericLogo/assets/generic-logo.png +0 -0
- package/lib/commonjs/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
- package/lib/commonjs/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
- package/lib/commonjs/Icons/GenericLogo/index.js +30 -0
- package/lib/commonjs/Icons/GenericLogo/index.js.map +1 -0
- package/lib/commonjs/Icons/Headphones/assets/headphones.png +0 -0
- package/lib/commonjs/Icons/Headphones/assets/headphones@2x.png +0 -0
- package/lib/commonjs/Icons/Headphones/assets/headphones@3x.png +0 -0
- package/lib/commonjs/Icons/Headphones/index.js +30 -0
- package/lib/commonjs/Icons/Headphones/index.js.map +1 -0
- package/lib/commonjs/Icons/Person/assets/person.png +0 -0
- package/lib/commonjs/Icons/Person/assets/person@2x.png +0 -0
- package/lib/commonjs/Icons/Person/assets/person@3x.png +0 -0
- package/lib/commonjs/Icons/Person/index.js +30 -0
- package/lib/commonjs/Icons/Person/index.js.map +1 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-large.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-large@2x.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-large@3x.png +0 -0
- package/lib/commonjs/Icons/Speaker/index.js +7 -2
- package/lib/commonjs/Icons/Speaker/index.js.map +1 -1
- package/lib/commonjs/Icons/Wave/assets/wave.png +0 -0
- package/lib/commonjs/Icons/Wave/assets/wave@2x.png +0 -0
- package/lib/commonjs/Icons/Wave/assets/wave@3x.png +0 -0
- package/lib/commonjs/Icons/Wave/index.js +30 -0
- package/lib/commonjs/Icons/Wave/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +66 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/BackButton.js +1 -1
- package/lib/commonjs/components/BackButton.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewJoinButton.js +11 -4
- package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewPeersList.js +9 -32
- package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewSubtitle.js +1 -1
- package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTile.js +11 -61
- package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTitle.js +0 -1
- package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/{HMSPreviewDeviceSettings.js → HMSSpeakerSettings.js} +69 -161
- package/lib/commonjs/components/HMSSpeakerSettings.js.map +1 -0
- package/lib/commonjs/components/Preview.js +72 -21
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/hooks-util.js +17 -60
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +2 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +11 -1
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/hmsStates.js +12 -1
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/commonjs/utils/theme.js +5 -1
- package/lib/commonjs/utils/theme.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +1 -1
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/AnswerPhone/assets/answer-phone.png +0 -0
- package/lib/module/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
- package/lib/module/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
- package/lib/module/Icons/AnswerPhone/index.js +22 -0
- package/lib/module/Icons/AnswerPhone/index.js.map +1 -0
- package/lib/module/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
- package/lib/module/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
- package/lib/module/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
- package/lib/module/Icons/Bluetooth/index.js +22 -0
- package/lib/module/Icons/Bluetooth/index.js.map +1 -0
- package/lib/module/Icons/GenericLogo/assets/generic-logo.png +0 -0
- package/lib/module/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
- package/lib/module/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
- package/lib/module/Icons/GenericLogo/index.js +22 -0
- package/lib/module/Icons/GenericLogo/index.js.map +1 -0
- package/lib/module/Icons/Headphones/assets/headphones.png +0 -0
- package/lib/module/Icons/Headphones/assets/headphones@2x.png +0 -0
- package/lib/module/Icons/Headphones/assets/headphones@3x.png +0 -0
- package/lib/module/Icons/Headphones/index.js +22 -0
- package/lib/module/Icons/Headphones/index.js.map +1 -0
- package/lib/module/Icons/Person/assets/person.png +0 -0
- package/lib/module/Icons/Person/assets/person@2x.png +0 -0
- package/lib/module/Icons/Person/assets/person@3x.png +0 -0
- package/lib/module/Icons/Person/index.js +22 -0
- package/lib/module/Icons/Person/index.js.map +1 -0
- package/lib/module/Icons/Speaker/assets/speaker-large.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker-large@2x.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker-large@3x.png +0 -0
- package/lib/module/Icons/Speaker/index.js +7 -2
- package/lib/module/Icons/Speaker/index.js.map +1 -1
- package/lib/module/Icons/Wave/assets/wave.png +0 -0
- package/lib/module/Icons/Wave/assets/wave@2x.png +0 -0
- package/lib/module/Icons/Wave/assets/wave@3x.png +0 -0
- package/lib/module/Icons/Wave/index.js +22 -0
- package/lib/module/Icons/Wave/index.js.map +1 -0
- package/lib/module/Icons/index.js +6 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/BackButton.js +1 -1
- package/lib/module/components/BackButton.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js +1 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewJoinButton.js +11 -4
- package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/module/components/HMSPreviewPeersList.js +9 -32
- package/lib/module/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/module/components/HMSPreviewSubtitle.js +1 -1
- package/lib/module/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/module/components/HMSPreviewTile.js +12 -62
- package/lib/module/components/HMSPreviewTile.js.map +1 -1
- package/lib/module/components/HMSPreviewTitle.js +0 -1
- package/lib/module/components/HMSPreviewTitle.js.map +1 -1
- package/lib/module/components/HMSSpeakerSettings.js +204 -0
- package/lib/module/components/HMSSpeakerSettings.js.map +1 -0
- package/lib/module/components/Preview.js +73 -23
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/hooks-util.js +18 -61
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +2 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +8 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/hmsStates.js +12 -1
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/utils/theme.js +5 -1
- package/lib/module/utils/theme.js.map +1 -1
- package/lib/typescript/Icons/AnswerPhone/index.d.ts +7 -0
- package/lib/typescript/Icons/AnswerPhone/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Bluetooth/index.d.ts +7 -0
- package/lib/typescript/Icons/Bluetooth/index.d.ts.map +1 -0
- package/lib/typescript/Icons/GenericLogo/index.d.ts +7 -0
- package/lib/typescript/Icons/GenericLogo/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Headphones/index.d.ts +7 -0
- package/lib/typescript/Icons/Headphones/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Person/index.d.ts +7 -0
- package/lib/typescript/Icons/Person/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Speaker/index.d.ts +1 -0
- package/lib/typescript/Icons/Speaker/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Wave/index.d.ts +7 -0
- package/lib/typescript/Icons/Wave/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +6 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewPeersList.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewTile.d.ts.map +1 -1
- package/lib/typescript/components/HMSSpeakerSettings.d.ts +3 -0
- package/lib/typescript/components/HMSSpeakerSettings.d.ts.map +1 -0
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +1 -1
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +3 -1
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +8 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +1 -0
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/hmsStates.d.ts +11 -2
- package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +1 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/utils/theme.d.ts +4 -0
- package/lib/typescript/utils/theme.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/HMSRoomSetup.tsx +1 -1
- package/src/Icons/AnswerPhone/assets/answer-phone.png +0 -0
- package/src/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
- package/src/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
- package/src/Icons/AnswerPhone/index.tsx +27 -0
- package/src/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
- package/src/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
- package/src/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
- package/src/Icons/Bluetooth/index.tsx +27 -0
- package/src/Icons/GenericLogo/assets/generic-logo.png +0 -0
- package/src/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
- package/src/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
- package/src/Icons/GenericLogo/index.tsx +27 -0
- package/src/Icons/Headphones/assets/headphones.png +0 -0
- package/src/Icons/Headphones/assets/headphones@2x.png +0 -0
- package/src/Icons/Headphones/assets/headphones@3x.png +0 -0
- package/src/Icons/Headphones/index.tsx +27 -0
- package/src/Icons/Person/assets/person.png +0 -0
- package/src/Icons/Person/assets/person@2x.png +0 -0
- package/src/Icons/Person/assets/person@3x.png +0 -0
- package/src/Icons/Person/index.tsx +27 -0
- package/src/Icons/Speaker/assets/speaker-large.png +0 -0
- package/src/Icons/Speaker/assets/speaker-large@2x.png +0 -0
- package/src/Icons/Speaker/assets/speaker-large@3x.png +0 -0
- package/src/Icons/Speaker/index.tsx +10 -2
- package/src/Icons/Wave/assets/wave.png +0 -0
- package/src/Icons/Wave/assets/wave@2x.png +0 -0
- package/src/Icons/Wave/assets/wave@3x.png +0 -0
- package/src/Icons/Wave/index.tsx +24 -0
- package/src/Icons/index.ts +6 -0
- package/src/components/BackButton.tsx +1 -1
- package/src/components/HMSPreviewEditName.tsx +1 -1
- package/src/components/HMSPreviewJoinButton.tsx +21 -4
- package/src/components/HMSPreviewPeersList.tsx +19 -40
- package/src/components/HMSPreviewSubtitle.tsx +1 -1
- package/src/components/HMSPreviewTile.tsx +11 -67
- package/src/components/HMSPreviewTitle.tsx +0 -1
- package/src/components/HMSSpeakerSettings.tsx +259 -0
- package/src/components/Preview.tsx +92 -37
- package/src/hooks-util.ts +23 -57
- package/src/redux/actionTypes.ts +2 -0
- package/src/redux/actions/index.ts +10 -0
- package/src/redux/reducers/hmsStates.ts +28 -1
- package/src/utils/theme.ts +5 -1
- package/lib/commonjs/components/HMSPreviewDeviceSettings.js.map +0 -1
- package/lib/module/components/HMSPreviewDeviceSettings.js +0 -296
- package/lib/module/components/HMSPreviewDeviceSettings.js.map +0 -1
- package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts +0 -3
- package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts.map +0 -1
- package/src/components/HMSPreviewDeviceSettings.tsx +0 -387
|
@@ -47,6 +47,7 @@ declare const _default: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
47
47
|
room: import("@100mslive/react-native-hms").HMSRoom | null;
|
|
48
48
|
localPeer: import("@100mslive/react-native-hms").HMSLocalPeer | null;
|
|
49
49
|
roles: import("@100mslive/react-native-hms").HMSRole[];
|
|
50
|
+
previewPeersList: import("@100mslive/react-native-hms").HMSPeer[];
|
|
50
51
|
};
|
|
51
52
|
chatWindow: any;
|
|
52
53
|
}>, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/reducers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/reducers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAMG"}
|
|
@@ -50,6 +50,9 @@ export declare const COLORS: {
|
|
|
50
50
|
DEFAULT: string;
|
|
51
51
|
DARK: string;
|
|
52
52
|
DISABLED: string;
|
|
53
|
+
ON_PRIMARY: {
|
|
54
|
+
LOW: string;
|
|
55
|
+
};
|
|
53
56
|
};
|
|
54
57
|
SECONDARY: {
|
|
55
58
|
DIM: string;
|
|
@@ -83,6 +86,7 @@ export declare const COLORS: {
|
|
|
83
86
|
LIGHTER: string;
|
|
84
87
|
ON_SURFACE: {
|
|
85
88
|
LOW: string;
|
|
89
|
+
MEDIUM: string;
|
|
86
90
|
HIGH: string;
|
|
87
91
|
};
|
|
88
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ChB,CAAC;AAGH,eAAO,MAAM,WAAW,aAAkB,CAAC;AAC3C,eAAO,MAAM,WAAW,UAAW,KAAK,UAAwB,CAAC;AAEjE,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ChB,CAAC;AAGH,eAAO,MAAM,WAAW,aAAkB,CAAC;AAC3C,eAAO,MAAM,WAAW,UAAW,KAAK,UAAwB,CAAC;AAEjE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFlB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@100mslive/react-native-room-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"react-native-document-picker": "^8.1.1",
|
|
61
61
|
"react-native-fs": "^2.19.0",
|
|
62
62
|
"react-native-gesture-handler": "^1.10.3",
|
|
63
|
+
"react-native-linear-gradient": "^2.7.3",
|
|
63
64
|
"react-native-modal": "^12.1.0",
|
|
64
65
|
"react-native-safe-area-context": "^3.3.0",
|
|
65
66
|
"react-native-share": "^8.2.2",
|
|
@@ -94,9 +95,9 @@
|
|
|
94
95
|
"peerDependencies": {
|
|
95
96
|
"react": "*",
|
|
96
97
|
"react-native": "*",
|
|
97
|
-
"react-native-
|
|
98
|
+
"react-native-permissions": "3.4.0",
|
|
98
99
|
"react-native-reanimated": "^2.17.0",
|
|
99
|
-
"react-native-
|
|
100
|
+
"react-native-vector-icons": "^9.1.0"
|
|
100
101
|
},
|
|
101
102
|
"resolutions": {
|
|
102
103
|
"@types/react": "17.0.21"
|
package/src/HMSRoomSetup.tsx
CHANGED
|
@@ -68,7 +68,7 @@ export const HMSRoomSetup = () => {
|
|
|
68
68
|
}, [getConfig, hmsInstance]);
|
|
69
69
|
|
|
70
70
|
// HMS Room, Peers, Track Listeners
|
|
71
|
-
useHMSListeners(setPeerTrackNodes, setMeetingState);
|
|
71
|
+
useHMSListeners(meetingState, setPeerTrackNodes, setMeetingState);
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Session store is a shared realtime key-value store that is accessible by everyone in the room.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, StyleSheet } from 'react-native';
|
|
3
|
+
import type { ImageProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface AnswerPhoneIconProps extends Omit<ImageProps, 'source'> {}
|
|
6
|
+
|
|
7
|
+
export const AnswerPhoneIcon: React.FC<AnswerPhoneIconProps> = ({
|
|
8
|
+
style,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Image
|
|
13
|
+
source={require('./assets/answer-phone.png')}
|
|
14
|
+
style={[styles.icon, style]}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
icon: {
|
|
22
|
+
width: 24,
|
|
23
|
+
height: 24,
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, StyleSheet } from 'react-native';
|
|
3
|
+
import type { ImageProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface BluetoothIconProps extends Omit<ImageProps, 'source'> {}
|
|
6
|
+
|
|
7
|
+
export const BluetoothIcon: React.FC<BluetoothIconProps> = ({
|
|
8
|
+
style,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Image
|
|
13
|
+
source={require('./assets/bluetooth-on.png')}
|
|
14
|
+
style={[styles.icon, style]}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
icon: {
|
|
22
|
+
width: 24,
|
|
23
|
+
height: 24,
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, StyleSheet } from 'react-native';
|
|
3
|
+
import type { ImageProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface GenericLogoIconProps extends Omit<ImageProps, 'source'> {}
|
|
6
|
+
|
|
7
|
+
export const GenericLogoIcon: React.FC<GenericLogoIconProps> = ({
|
|
8
|
+
style,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Image
|
|
13
|
+
source={require('./assets/generic-logo.png')}
|
|
14
|
+
style={[styles.icon, style]}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
icon: {
|
|
22
|
+
width: 30,
|
|
23
|
+
height: 30,
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, StyleSheet } from 'react-native';
|
|
3
|
+
import type { ImageProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface HeadphonesIconProps extends Omit<ImageProps, 'source'> {}
|
|
6
|
+
|
|
7
|
+
export const HeadphonesIcon: React.FC<HeadphonesIconProps> = ({
|
|
8
|
+
style,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Image
|
|
13
|
+
source={require('./assets/headphones.png')}
|
|
14
|
+
style={[styles.icon, style]}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
icon: {
|
|
22
|
+
width: 24,
|
|
23
|
+
height: 24,
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, StyleSheet } from 'react-native';
|
|
3
|
+
import type { ImageProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface PersonIconProps extends Omit<ImageProps, 'source'> {}
|
|
6
|
+
|
|
7
|
+
export const PersonIcon: React.FC<PersonIconProps> = ({
|
|
8
|
+
style,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Image
|
|
13
|
+
source={require('./assets/person.png')}
|
|
14
|
+
style={[styles.icon, style]}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
icon: {
|
|
22
|
+
width: 24,
|
|
23
|
+
height: 24,
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -4,9 +4,11 @@ import type { ImageProps } from 'react-native';
|
|
|
4
4
|
|
|
5
5
|
interface SpeakerIconProps extends Omit<ImageProps, 'source'> {
|
|
6
6
|
muted: boolean;
|
|
7
|
+
size?: 'normal' | 'large';
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export const SpeakerIcon: React.FC<SpeakerIconProps> = ({
|
|
11
|
+
size = 'normal',
|
|
10
12
|
muted,
|
|
11
13
|
style,
|
|
12
14
|
...restProps
|
|
@@ -16,9 +18,11 @@ export const SpeakerIcon: React.FC<SpeakerIconProps> = ({
|
|
|
16
18
|
source={
|
|
17
19
|
muted
|
|
18
20
|
? require('./assets/speaker-muted.png')
|
|
19
|
-
:
|
|
21
|
+
: size === 'normal'
|
|
22
|
+
? require('./assets/speaker.png')
|
|
23
|
+
: require('./assets/speaker-large.png')
|
|
20
24
|
}
|
|
21
|
-
style={[styles.icon, style]}
|
|
25
|
+
style={[styles.icon, style, size === 'large' ? styles.large : null]}
|
|
22
26
|
{...restProps}
|
|
23
27
|
/>
|
|
24
28
|
);
|
|
@@ -31,4 +35,8 @@ const styles = StyleSheet.create({
|
|
|
31
35
|
alignItems: 'center',
|
|
32
36
|
justifyContent: 'center',
|
|
33
37
|
},
|
|
38
|
+
large: {
|
|
39
|
+
width: 32,
|
|
40
|
+
height: 32,
|
|
41
|
+
},
|
|
34
42
|
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, StyleSheet } from 'react-native';
|
|
3
|
+
import type { ImageProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface WaveIconProps extends Omit<ImageProps, 'source'> {}
|
|
6
|
+
|
|
7
|
+
export const WaveIcon: React.FC<WaveIconProps> = ({ style, ...restProps }) => {
|
|
8
|
+
return (
|
|
9
|
+
<Image
|
|
10
|
+
source={require('./assets/wave.png')}
|
|
11
|
+
style={[styles.icon, style]}
|
|
12
|
+
{...restProps}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const styles = StyleSheet.create({
|
|
18
|
+
icon: {
|
|
19
|
+
width: 24,
|
|
20
|
+
height: 24,
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
},
|
|
24
|
+
});
|
package/src/Icons/index.ts
CHANGED
|
@@ -17,3 +17,9 @@ export * from './Clock';
|
|
|
17
17
|
export * from './End';
|
|
18
18
|
export * from './100ms';
|
|
19
19
|
export * from './Hand';
|
|
20
|
+
export * from './Person';
|
|
21
|
+
export * from './AnswerPhone';
|
|
22
|
+
export * from './Bluetooth';
|
|
23
|
+
export * from './Headphones';
|
|
24
|
+
export * from './Wave';
|
|
25
|
+
export * from './GenericLogo';
|
|
@@ -29,7 +29,7 @@ export const HMSPreviewEditName: React.FC<HMSPreviewEditNameProps> = () => {
|
|
|
29
29
|
style={[styles.input, inputFocused ? styles.focusedInput : null]}
|
|
30
30
|
value={userName}
|
|
31
31
|
onChangeText={handleNameChange}
|
|
32
|
-
placeholder="Name"
|
|
32
|
+
placeholder="Enter Name..."
|
|
33
33
|
autoCapitalize="words"
|
|
34
34
|
autoCompleteType="name"
|
|
35
35
|
placeholderTextColor={COLORS.SURFACE.ON_SURFACE.LOW}
|
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
Text,
|
|
6
6
|
TouchableHighlight,
|
|
7
7
|
} from 'react-native';
|
|
8
|
+
import { useSelector } from 'react-redux';
|
|
8
9
|
|
|
9
10
|
import { COLORS } from '../utils/theme';
|
|
11
|
+
import type { RootState } from '../redux';
|
|
10
12
|
|
|
11
13
|
export interface HMSPreviewJoinButtonProps {
|
|
12
14
|
onJoin(): void;
|
|
@@ -17,12 +19,21 @@ export const HMSPreviewJoinButton: React.FC<HMSPreviewJoinButtonProps> = ({
|
|
|
17
19
|
loading,
|
|
18
20
|
onJoin,
|
|
19
21
|
}) => {
|
|
22
|
+
const userNameInvalid = useSelector(
|
|
23
|
+
(state: RootState) => state.user.userName.length <= 0
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const disabledJoin = userNameInvalid || loading;
|
|
27
|
+
|
|
20
28
|
return (
|
|
21
29
|
<TouchableHighlight
|
|
22
30
|
underlayColor={COLORS.PRIMARY.DARK}
|
|
23
|
-
style={
|
|
31
|
+
style={[
|
|
32
|
+
styles.button,
|
|
33
|
+
disabledJoin ? { backgroundColor: COLORS.PRIMARY.DISABLED } : null,
|
|
34
|
+
]}
|
|
24
35
|
onPress={onJoin}
|
|
25
|
-
disabled={
|
|
36
|
+
disabled={disabledJoin}
|
|
26
37
|
>
|
|
27
38
|
<>
|
|
28
39
|
{loading ? (
|
|
@@ -33,8 +44,14 @@ export const HMSPreviewJoinButton: React.FC<HMSPreviewJoinButtonProps> = ({
|
|
|
33
44
|
/>
|
|
34
45
|
) : null}
|
|
35
46
|
|
|
36
|
-
<Text
|
|
37
|
-
{
|
|
47
|
+
<Text
|
|
48
|
+
style={[
|
|
49
|
+
styles.text,
|
|
50
|
+
{ opacity: loading ? 0 : undefined },
|
|
51
|
+
disabledJoin ? { color: COLORS.PRIMARY.ON_PRIMARY.LOW } : null,
|
|
52
|
+
]}
|
|
53
|
+
>
|
|
54
|
+
Join Now
|
|
38
55
|
</Text>
|
|
39
56
|
</>
|
|
40
57
|
</TouchableHighlight>
|
|
@@ -1,53 +1,30 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
// HMSPeerUpdate,
|
|
6
|
-
// useHMSPeerUpdates,
|
|
7
|
-
} from '@100mslive/react-native-hms';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import type { HMSPeer } from '@100mslive/react-native-hms';
|
|
8
5
|
|
|
9
6
|
import { COLORS } from '../utils/theme';
|
|
10
7
|
import { ParticipantsIcon } from '../Icons';
|
|
8
|
+
import type { RootState } from '../redux';
|
|
11
9
|
|
|
12
10
|
export interface HMSPreviewPeersListProps {}
|
|
13
11
|
|
|
14
12
|
export const HMSPreviewPeersList: React.FC<HMSPreviewPeersListProps> = () => {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// It leads to some already joined peer missing in list
|
|
19
|
-
// useHMSPeerUpdates(
|
|
20
|
-
// ({ peer, type }: { peer: HMSPeer; type: HMSPeerUpdate }) => {
|
|
21
|
-
// switch (type) {
|
|
22
|
-
// case HMSPeerUpdate.PEER_JOINED:
|
|
23
|
-
// setPeerList((prevPeerList) => [...prevPeerList, peer]);
|
|
24
|
-
// break;
|
|
25
|
-
// case HMSPeerUpdate.PEER_LEFT:
|
|
26
|
-
// setPeerList((prevPeerList) =>
|
|
27
|
-
// prevPeerList.filter(
|
|
28
|
-
// (peerFromList) => peerFromList.peerID !== peer.peerID
|
|
29
|
-
// )
|
|
30
|
-
// );
|
|
31
|
-
// break;
|
|
32
|
-
|
|
33
|
-
// default:
|
|
34
|
-
// break;
|
|
35
|
-
// }
|
|
36
|
-
// },
|
|
37
|
-
// []
|
|
38
|
-
// );
|
|
13
|
+
const previewPeersList = useSelector(
|
|
14
|
+
(state: RootState) => state.hmsStates.previewPeersList
|
|
15
|
+
);
|
|
39
16
|
|
|
40
17
|
return (
|
|
41
18
|
<View style={styles.container}>
|
|
42
|
-
{
|
|
19
|
+
{previewPeersList.length > 0 ? <ParticipantsIcon /> : null}
|
|
43
20
|
|
|
44
|
-
{
|
|
21
|
+
{previewPeersList.length === 0 ? (
|
|
45
22
|
<Text style={[styles.text, styles.textSpacer]}>
|
|
46
23
|
You are the first to join
|
|
47
24
|
</Text>
|
|
48
|
-
) :
|
|
25
|
+
) : previewPeersList.length === 1 ? (
|
|
49
26
|
<Text style={[styles.text, styles.textSpacer]}>
|
|
50
|
-
{
|
|
27
|
+
{previewPeersList[0]!.name} has joined
|
|
51
28
|
</Text>
|
|
52
29
|
) : (
|
|
53
30
|
<View style={styles.multiTextContainer}>
|
|
@@ -56,17 +33,17 @@ export const HMSPreviewPeersList: React.FC<HMSPreviewPeersListProps> = () => {
|
|
|
56
33
|
ellipsizeMode="tail"
|
|
57
34
|
numberOfLines={1}
|
|
58
35
|
>
|
|
59
|
-
{
|
|
36
|
+
{previewPeersList
|
|
60
37
|
.slice(0, 2)
|
|
61
|
-
.map((peer) => peer.name)
|
|
38
|
+
.map((peer: HMSPeer) => peer.name)
|
|
62
39
|
.join(', ')}
|
|
63
40
|
</Text>
|
|
64
41
|
|
|
65
|
-
{
|
|
42
|
+
{previewPeersList.length - 2 > 0 ? (
|
|
66
43
|
<Text style={styles.text}>
|
|
67
44
|
{' '}
|
|
68
|
-
+{
|
|
69
|
-
{
|
|
45
|
+
+{previewPeersList.length - 2}{' '}
|
|
46
|
+
{previewPeersList.length - 2 > 1 ? 'others' : 'other'}
|
|
70
47
|
</Text>
|
|
71
48
|
) : null}
|
|
72
49
|
</View>
|
|
@@ -81,7 +58,6 @@ const styles = StyleSheet.create({
|
|
|
81
58
|
alignItems: 'center',
|
|
82
59
|
backgroundColor: COLORS.SURFACE.DEFAULT,
|
|
83
60
|
marginTop: 16,
|
|
84
|
-
marginBottom: 24,
|
|
85
61
|
alignSelf: 'center',
|
|
86
62
|
paddingVertical: 8,
|
|
87
63
|
paddingHorizontal: 12,
|
|
@@ -99,7 +75,10 @@ const styles = StyleSheet.create({
|
|
|
99
75
|
textSpacer: {
|
|
100
76
|
marginHorizontal: 8,
|
|
101
77
|
},
|
|
102
|
-
flexView: {
|
|
78
|
+
flexView: {
|
|
79
|
+
flex: 1,
|
|
80
|
+
flexShrink: 1,
|
|
81
|
+
},
|
|
103
82
|
multiTextContainer: {
|
|
104
83
|
flexDirection: 'row',
|
|
105
84
|
marginHorizontal: 8,
|
|
@@ -15,7 +15,7 @@ export const HMSPreviewSubtitle: React.FC<HMSPreviewSubtitleProps> = ({
|
|
|
15
15
|
|
|
16
16
|
const styles = StyleSheet.create({
|
|
17
17
|
title: {
|
|
18
|
-
color: COLORS.SURFACE.ON_SURFACE.
|
|
18
|
+
color: COLORS.SURFACE.ON_SURFACE.MEDIUM,
|
|
19
19
|
fontSize: 14,
|
|
20
20
|
fontFamily: 'Inter',
|
|
21
21
|
fontWeight: '400',
|
|
@@ -3,7 +3,7 @@ import { useSelector } from 'react-redux';
|
|
|
3
3
|
import { HMSVideoViewMode } from '@100mslive/react-native-hms';
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { PersonIcon } from '../Icons';
|
|
7
7
|
import { useHMSInstance } from '../hooks-util';
|
|
8
8
|
import type { RootState } from '../redux';
|
|
9
9
|
import { getInitials } from '../utils/functions';
|
|
@@ -21,16 +21,9 @@ export const HMSPreviewTile: React.FC = () => {
|
|
|
21
21
|
const isLocalVideoMuted = useSelector(
|
|
22
22
|
(state: RootState) => state.hmsStates.isLocalVideoMuted
|
|
23
23
|
);
|
|
24
|
-
const isLocalAudioMuted = useSelector(
|
|
25
|
-
(state: RootState) => state.hmsStates.isLocalAudioMuted
|
|
26
|
-
);
|
|
27
24
|
const localVideoTrackId = useSelector(
|
|
28
25
|
(state: RootState) => state.hmsStates.localPeer?.videoTrack?.trackId
|
|
29
26
|
);
|
|
30
|
-
const localPeerNetworkQuality = useSelector(
|
|
31
|
-
(state: RootState) =>
|
|
32
|
-
state.hmsStates.localPeer?.networkQuality?.downlinkQuality
|
|
33
|
-
);
|
|
34
27
|
const userName = useSelector((state: RootState) => state.user.userName);
|
|
35
28
|
|
|
36
29
|
React.useEffect(() => {
|
|
@@ -43,15 +36,12 @@ export const HMSPreviewTile: React.FC = () => {
|
|
|
43
36
|
<View style={styles.modalContainer}>
|
|
44
37
|
{isLocalVideoMuted || !localVideoTrackId ? (
|
|
45
38
|
<View style={styles.avatarContainer}>
|
|
46
|
-
<View
|
|
47
|
-
|
|
48
|
-
styles.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<Text style={styles.avatarText}>
|
|
53
|
-
{userName.length === 0 ? '👤' : getInitials(userName)}
|
|
54
|
-
</Text>
|
|
39
|
+
<View style={styles.avatar}>
|
|
40
|
+
{userName.length === 0 ? (
|
|
41
|
+
<PersonIcon style={styles.avatarIcon} />
|
|
42
|
+
) : (
|
|
43
|
+
<Text style={styles.avatarText}>{getInitials(userName)}</Text>
|
|
44
|
+
)}
|
|
55
45
|
</View>
|
|
56
46
|
</View>
|
|
57
47
|
) : (
|
|
@@ -64,18 +54,6 @@ export const HMSPreviewTile: React.FC = () => {
|
|
|
64
54
|
style={styles.hmsView}
|
|
65
55
|
/>
|
|
66
56
|
)}
|
|
67
|
-
|
|
68
|
-
{isLocalAudioMuted ? (
|
|
69
|
-
<View style={styles.micMuted}>
|
|
70
|
-
<MicIcon muted={true} style={styles.micMutedIcon} />
|
|
71
|
-
</View>
|
|
72
|
-
) : null}
|
|
73
|
-
|
|
74
|
-
<View style={styles.nameInTileContainer}>
|
|
75
|
-
{userName ? <Text style={styles.nameInTile}>{userName}</Text> : null}
|
|
76
|
-
|
|
77
|
-
<NetworkQualityIcon quality={localPeerNetworkQuality} />
|
|
78
|
-
</View>
|
|
79
57
|
</View>
|
|
80
58
|
);
|
|
81
59
|
};
|
|
@@ -84,29 +62,12 @@ const styles = StyleSheet.create({
|
|
|
84
62
|
modalContainer: {
|
|
85
63
|
flex: 1,
|
|
86
64
|
position: 'relative',
|
|
87
|
-
backgroundColor: COLORS.BACKGROUND.
|
|
88
|
-
marginHorizontal: 8,
|
|
89
|
-
borderRadius: 16,
|
|
90
|
-
alignSelf: 'center',
|
|
65
|
+
backgroundColor: COLORS.BACKGROUND.DIM,
|
|
91
66
|
overflow: 'hidden',
|
|
92
|
-
minWidth: '50%',
|
|
93
|
-
// minHeight: '50%',
|
|
94
|
-
aspectRatio: 377 / 482, // TODO: DO WE NEED THIS?
|
|
95
67
|
},
|
|
96
68
|
hmsView: {
|
|
97
69
|
flex: 1,
|
|
98
70
|
},
|
|
99
|
-
micMuted: {
|
|
100
|
-
position: 'absolute',
|
|
101
|
-
top: 8,
|
|
102
|
-
right: 8,
|
|
103
|
-
backgroundColor: COLORS.ALERT.ERROR.DEFAULT,
|
|
104
|
-
padding: 8,
|
|
105
|
-
borderRadius: 12,
|
|
106
|
-
},
|
|
107
|
-
micMutedIcon: {
|
|
108
|
-
tintColor: COLORS.ALERT.ERROR.BRIGHTER,
|
|
109
|
-
},
|
|
110
71
|
avatarContainer: {
|
|
111
72
|
flex: 1,
|
|
112
73
|
alignItems: 'center',
|
|
@@ -120,8 +81,9 @@ const styles = StyleSheet.create({
|
|
|
120
81
|
justifyContent: 'center',
|
|
121
82
|
alignItems: 'center',
|
|
122
83
|
},
|
|
123
|
-
|
|
124
|
-
|
|
84
|
+
avatarIcon: {
|
|
85
|
+
width: 40,
|
|
86
|
+
height: 40,
|
|
125
87
|
},
|
|
126
88
|
avatarText: {
|
|
127
89
|
color: COLORS.SURFACE.ON_SURFACE.HIGH,
|
|
@@ -131,22 +93,4 @@ const styles = StyleSheet.create({
|
|
|
131
93
|
lineHeight: 40,
|
|
132
94
|
letterSpacing: 0.25,
|
|
133
95
|
},
|
|
134
|
-
nameInTileContainer: {
|
|
135
|
-
position: 'absolute',
|
|
136
|
-
bottom: 8,
|
|
137
|
-
left: 8,
|
|
138
|
-
backgroundColor: COLORS.BACKGROUND.DIM_80,
|
|
139
|
-
padding: 8,
|
|
140
|
-
borderRadius: 12,
|
|
141
|
-
flexDirection: 'row',
|
|
142
|
-
},
|
|
143
|
-
nameInTile: {
|
|
144
|
-
color: COLORS.SURFACE.ON_SURFACE.HIGH,
|
|
145
|
-
fontSize: 14,
|
|
146
|
-
fontFamily: 'Inter',
|
|
147
|
-
fontWeight: '400',
|
|
148
|
-
lineHeight: 20,
|
|
149
|
-
letterSpacing: 0.25,
|
|
150
|
-
marginRight: 8,
|
|
151
|
-
},
|
|
152
96
|
});
|