@stream-io/video-react-native-sdk 0.0.4 → 0.0.6
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/CHANGELOG.md +14 -0
- package/dist/src/components/Call/CallControls/ToggleCameraFaceButton.js +4 -1
- package/dist/src/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
- package/dist/src/components/Call/RingingCallContent/RingingCallContent.d.ts +1 -2
- package/dist/src/components/Call/RingingCallContent/RingingCallContent.js +3 -3
- package/dist/src/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/src/utils/setClientDetails.js +31 -7
- package/dist/src/utils/setClientDetails.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -3
- package/src/components/Call/CallControls/ToggleCameraFaceButton.tsx +5 -1
- package/src/components/Call/RingingCallContent/RingingCallContent.tsx +3 -3
- package/src/utils/setClientDetails.ts +32 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.0.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.5...@stream-io/video-react-native-sdk-0.0.6) (2023-09-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* added missing props for RingingCallContent ([#1057](https://github.com/GetStream/stream-video-js/issues/1057)) ([60bb247](https://github.com/GetStream/stream-video-js/commit/60bb2474f837346a87e06610fe26758caf12c890))
|
|
11
|
+
|
|
12
|
+
### [0.0.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.4...@stream-io/video-react-native-sdk-0.0.5) (2023-09-05)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* override default handler with onPressHandler prop for ToggleCameraButton ([#1053](https://github.com/GetStream/stream-video-js/issues/1053)) ([2eecce6](https://github.com/GetStream/stream-video-js/commit/2eecce6d8e66ba58bede69776815efa929680716))
|
|
18
|
+
|
|
5
19
|
### [0.0.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.3...@stream-io/video-react-native-sdk-0.0.4) (2023-09-05)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -13,7 +13,10 @@ export const ToggleCameraFaceButton = ({ onPressHandler, }) => {
|
|
|
13
13
|
const { status, direction } = useCameraState();
|
|
14
14
|
const { theme: { colors, toggleCameraFaceButton }, } = useTheme();
|
|
15
15
|
const onPress = async () => {
|
|
16
|
-
onPressHandler
|
|
16
|
+
if (onPressHandler) {
|
|
17
|
+
onPressHandler();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
17
20
|
await call?.camera.flip();
|
|
18
21
|
};
|
|
19
22
|
return (React.createElement(Restricted, { requiredGrants: [OwnCapability.SEND_VIDEO] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleCameraFaceButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ToggleCameraFaceButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,UAAU,EACV,OAAO,EACP,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAa1D;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,cAAc,GACc,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAC/C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/C,MAAM,EACJ,KAAK,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE,GAC1C,GAAG,QAAQ,EAAE,CAAC;IACf,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;QACzB,cAAc,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ToggleCameraFaceButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ToggleCameraFaceButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,UAAU,EACV,OAAO,EACP,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAa1D;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,cAAc,GACc,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAC/C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/C,MAAM,EACJ,KAAK,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE,GAC1C,GAAG,QAAQ,EAAE,CAAC;IACf,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;QACzB,IAAI,cAAc,EAAE;YAClB,cAAc,EAAE,CAAC;YACjB,OAAO;SACR;QAED,MAAM,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IAAC,cAAc,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC;QACpD,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,EACvE,QAAQ,EAAE,MAAM,KAAK,UAAU,EAC/B,KAAK,EAAE,sBAAsB;YAE7B,oBAAC,YAAY,IACX,KAAK,EACH,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,GAEnE,CACiB,CACV,CACd,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -28,8 +28,7 @@ export type RingingCallContentProps = {
|
|
|
28
28
|
*/
|
|
29
29
|
JoiningCallIndicator?: React.ComponentType | null;
|
|
30
30
|
};
|
|
31
|
-
export declare const RingingCallPanel: ({ IncomingCall, OutgoingCall, CallContent, JoiningCallIndicator, CallTopView, }: RingingCallContentProps) => JSX.Element | null;
|
|
32
31
|
/**
|
|
33
32
|
* Component to show the Incoming, Outgoing and CalContent component depending upon the Call states when the call is in ringing mode.
|
|
34
33
|
*/
|
|
35
|
-
export declare const RingingCallContent: () => JSX.Element;
|
|
34
|
+
export declare const RingingCallContent: (props: RingingCallContentProps) => JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { IncomingCall as DefaultIncomingCall, } from './IncomingCall';
|
|
|
7
7
|
import { OutgoingCall as DefaultOutgoingCall, } from './OutgoingCall';
|
|
8
8
|
import { JoiningCallIndicator as DefaultJoiningCallIndicator } from './JoiningCallIndicator';
|
|
9
9
|
import { useTheme } from '../../../contexts';
|
|
10
|
-
|
|
10
|
+
const RingingCallPanel = ({ IncomingCall = DefaultIncomingCall, OutgoingCall = DefaultOutgoingCall, CallContent = DefaultCallContent, JoiningCallIndicator = DefaultJoiningCallIndicator, CallTopView, }) => {
|
|
11
11
|
const call = useCall();
|
|
12
12
|
const isCallCreatedByMe = call?.isCreatedByMe;
|
|
13
13
|
const { useCallCallingState } = useCallStateHooks();
|
|
@@ -28,10 +28,10 @@ export const RingingCallPanel = ({ IncomingCall = DefaultIncomingCall, OutgoingC
|
|
|
28
28
|
/**
|
|
29
29
|
* Component to show the Incoming, Outgoing and CalContent component depending upon the Call states when the call is in ringing mode.
|
|
30
30
|
*/
|
|
31
|
-
export const RingingCallContent = () => {
|
|
31
|
+
export const RingingCallContent = (props) => {
|
|
32
32
|
const { theme: { ringingCallContent }, } = useTheme();
|
|
33
33
|
return (React.createElement(View, { style: [styles.container, ringingCallContent.container] },
|
|
34
|
-
React.createElement(RingingCallPanel,
|
|
34
|
+
React.createElement(RingingCallPanel, { ...props })));
|
|
35
35
|
};
|
|
36
36
|
const styles = StyleSheet.create({
|
|
37
37
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RingingCallContent.js","sourceRoot":"","sources":["../../../../../src/components/Call/RingingCallContent/RingingCallContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,WAAW,IAAI,kBAAkB,GAElC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,GAEpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,IAAI,mBAAmB,GAEpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AA4B7C,MAAM,
|
|
1
|
+
{"version":3,"file":"RingingCallContent.js","sourceRoot":"","sources":["../../../../../src/components/Call/RingingCallContent/RingingCallContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,WAAW,IAAI,kBAAkB,GAElC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,GAEpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,IAAI,mBAAmB,GAEpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AA4B7C,MAAM,gBAAgB,GAAG,CAAC,EACxB,YAAY,GAAG,mBAAmB,EAClC,YAAY,GAAG,mBAAmB,EAClC,WAAW,GAAG,kBAAkB,EAChC,oBAAoB,GAAG,2BAA2B,EAClD,WAAW,GACa,EAAE,EAAE;IAC5B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,iBAAiB,GAAG,IAAI,EAAE,aAAa,CAAC;IAE9C,MAAM,EAAE,mBAAmB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACpD,MAAM,YAAY,GAAG,mBAAmB,EAAE,CAAC;IAE3C,QAAQ,YAAY,EAAE;QACpB,KAAK,YAAY,CAAC,OAAO;YACvB,OAAO,iBAAiB;gBACtB,CAAC,CAAC,YAAY,IAAI,oBAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI;gBAC5D,CAAC,CAAC,YAAY,IAAI,oBAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI,CAAC;QACjE,KAAK,YAAY,CAAC,MAAM;YACtB,OAAO,WAAW,IAAI,oBAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,CAAC;QAClE,KAAK,YAAY,CAAC,OAAO;YACvB,OAAO,oBAAoB,IAAI,oBAAC,oBAAoB,OAAG,CAAC;QAC1D;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAA8B,EAAE,EAAE;IACnE,MAAM,EACJ,KAAK,EAAE,EAAE,kBAAkB,EAAE,GAC9B,GAAG,QAAQ,EAAE,CAAC;IACf,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,SAAS,CAAC;QAC3D,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAC1B,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,GAAG,UAAU,CAAC,kBAAkB;KACjC;CACF,CAAC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { setSdkInfo, setDeviceInfo, setOSInfo, SfuModels, } from '@stream-io/video-client';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import { version } from '../../version';
|
|
4
|
-
import RNDeviceInfo from 'react-native-device-info';
|
|
5
4
|
const [major, minor, patch] = version.split('.');
|
|
6
5
|
export const setClientDetails = () => {
|
|
7
6
|
setSdkInfo({
|
|
@@ -10,15 +9,40 @@ export const setClientDetails = () => {
|
|
|
10
9
|
minor,
|
|
11
10
|
patch,
|
|
12
11
|
});
|
|
13
|
-
|
|
12
|
+
let osName = Platform.OS;
|
|
13
|
+
if (Platform.OS === 'ios') {
|
|
14
|
+
// example: "iOS" | "iPadOS"
|
|
15
|
+
osName = Platform.constants.systemName;
|
|
16
|
+
}
|
|
17
|
+
let osVersion = '';
|
|
18
|
+
if (Platform.OS === 'android') {
|
|
19
|
+
// example: "33" - its more OS API level than consumer version
|
|
20
|
+
osVersion = Platform.constants.Version.toString();
|
|
21
|
+
}
|
|
22
|
+
else if (Platform.OS === 'ios') {
|
|
23
|
+
// example: "16.2"
|
|
24
|
+
osVersion = Platform.constants.osVersion;
|
|
25
|
+
}
|
|
14
26
|
setOSInfo({
|
|
15
|
-
name:
|
|
16
|
-
version:
|
|
17
|
-
architecture:
|
|
27
|
+
name: osName,
|
|
28
|
+
version: osVersion,
|
|
29
|
+
architecture: '',
|
|
18
30
|
});
|
|
31
|
+
let deviceName = '';
|
|
32
|
+
if (Platform.OS === 'android') {
|
|
33
|
+
// Example: "Google Pixel 7"
|
|
34
|
+
const prefix = Platform.constants.Manufacturer.toLowerCase() ===
|
|
35
|
+
Platform.constants.Brand.toLowerCase()
|
|
36
|
+
? Platform.constants.Manufacturer
|
|
37
|
+
: `${Platform.constants.Manufacturer} ${Platform.constants.Brand}`;
|
|
38
|
+
deviceName = `${prefix} ${Platform.constants.Model}`;
|
|
39
|
+
}
|
|
40
|
+
else if (Platform.OS === 'ios') {
|
|
41
|
+
// note: osName check is necessary because Platform.isPad is not reliable
|
|
42
|
+
deviceName = Platform.isPad || osName === 'iPadOS' ? 'iPad' : 'iPhone';
|
|
43
|
+
}
|
|
19
44
|
setDeviceInfo({
|
|
20
|
-
|
|
21
|
-
name: `${deviceInfo.getManufacturerSync()} ${deviceInfo.getModel() ?? deviceInfo.getDeviceId()} ${deviceInfo.getDeviceType()}`,
|
|
45
|
+
name: deviceName,
|
|
22
46
|
version: '',
|
|
23
47
|
});
|
|
24
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setClientDetails.js","sourceRoot":"","sources":["../../../src/utils/setClientDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"setClientDetails.js","sourceRoot":"","sources":["../../../src/utils/setClientDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,UAAU,CAAC;QACT,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,YAAY;QACpC,KAAK;QACL,KAAK;QACL,KAAK;KACN,CAAC,CAAC;IAEH,IAAI,MAAM,GAAW,QAAQ,CAAC,EAAE,CAAC;IACjC,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,4BAA4B;QAC5B,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC;KACxC;IAED,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE;QAC7B,8DAA8D;QAC9D,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;KACnD;SAAM,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QAChC,kBAAkB;QAClB,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC;KAC1C;IAED,SAAS,CAAC;QACR,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,SAAS;QAClB,YAAY,EAAE,EAAE;KACjB,CAAC,CAAC;IAEH,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE;QAC7B,4BAA4B;QAC5B,MAAM,MAAM,GACV,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,WAAW,EAAE;YAC7C,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE;YACpC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,YAAY;YACjC,CAAC,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,YAAY,IAAI,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvE,UAAU,GAAG,GAAG,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;KACtD;SAAM,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QAChC,yEAAyE;QACzE,UAAU,GAAG,QAAQ,CAAC,KAAK,IAAI,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;KACxE;IAED,aAAa,CAAC;QACZ,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.6";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '0.0.
|
|
1
|
+
export const version = '0.0.6';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"react": ">=17.0.0",
|
|
58
58
|
"react-native": ">=0.67.0",
|
|
59
59
|
"react-native-callkeep": ">=4.3.11",
|
|
60
|
-
"react-native-device-info": ">=10.6.0",
|
|
61
60
|
"react-native-gesture-handler": ">=2.8.0",
|
|
62
61
|
"react-native-incall-manager": ">=4.1.0",
|
|
63
62
|
"react-native-reanimated": ">=2.7.0",
|
|
@@ -104,7 +103,6 @@
|
|
|
104
103
|
"jest": "^29.5.0",
|
|
105
104
|
"react-native": "0.71.8",
|
|
106
105
|
"react-native-callkeep": "4.3.11",
|
|
107
|
-
"react-native-device-info": "^10.6.0",
|
|
108
106
|
"react-native-gesture-handler": "2.8.0",
|
|
109
107
|
"react-native-incall-manager": "^4.0.0",
|
|
110
108
|
"react-native-reanimated": "2.7.0",
|
|
@@ -34,7 +34,11 @@ export const ToggleCameraFaceButton = ({
|
|
|
34
34
|
theme: { colors, toggleCameraFaceButton },
|
|
35
35
|
} = useTheme();
|
|
36
36
|
const onPress = async () => {
|
|
37
|
-
onPressHandler
|
|
37
|
+
if (onPressHandler) {
|
|
38
|
+
onPressHandler();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
await call?.camera.flip();
|
|
39
43
|
};
|
|
40
44
|
|
|
@@ -44,7 +44,7 @@ export type RingingCallContentProps = {
|
|
|
44
44
|
JoiningCallIndicator?: React.ComponentType | null;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
const RingingCallPanel = ({
|
|
48
48
|
IncomingCall = DefaultIncomingCall,
|
|
49
49
|
OutgoingCall = DefaultOutgoingCall,
|
|
50
50
|
CallContent = DefaultCallContent,
|
|
@@ -74,13 +74,13 @@ export const RingingCallPanel = ({
|
|
|
74
74
|
/**
|
|
75
75
|
* Component to show the Incoming, Outgoing and CalContent component depending upon the Call states when the call is in ringing mode.
|
|
76
76
|
*/
|
|
77
|
-
export const RingingCallContent = () => {
|
|
77
|
+
export const RingingCallContent = (props: RingingCallContentProps) => {
|
|
78
78
|
const {
|
|
79
79
|
theme: { ringingCallContent },
|
|
80
80
|
} = useTheme();
|
|
81
81
|
return (
|
|
82
82
|
<View style={[styles.container, ringingCallContent.container]}>
|
|
83
|
-
<RingingCallPanel />
|
|
83
|
+
<RingingCallPanel {...props} />
|
|
84
84
|
</View>
|
|
85
85
|
);
|
|
86
86
|
};
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
} from '@stream-io/video-client';
|
|
7
7
|
import { Platform } from 'react-native';
|
|
8
8
|
import { version } from '../../version';
|
|
9
|
-
import RNDeviceInfo from 'react-native-device-info';
|
|
10
9
|
|
|
11
10
|
const [major, minor, patch] = version.split('.');
|
|
12
11
|
|
|
@@ -18,19 +17,43 @@ export const setClientDetails = () => {
|
|
|
18
17
|
patch,
|
|
19
18
|
});
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
let osName: string = Platform.OS;
|
|
21
|
+
if (Platform.OS === 'ios') {
|
|
22
|
+
// example: "iOS" | "iPadOS"
|
|
23
|
+
osName = Platform.constants.systemName;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let osVersion = '';
|
|
27
|
+
if (Platform.OS === 'android') {
|
|
28
|
+
// example: "33" - its more OS API level than consumer version
|
|
29
|
+
osVersion = Platform.constants.Version.toString();
|
|
30
|
+
} else if (Platform.OS === 'ios') {
|
|
31
|
+
// example: "16.2"
|
|
32
|
+
osVersion = Platform.constants.osVersion;
|
|
33
|
+
}
|
|
22
34
|
|
|
23
35
|
setOSInfo({
|
|
24
|
-
name:
|
|
25
|
-
version:
|
|
26
|
-
architecture:
|
|
36
|
+
name: osName,
|
|
37
|
+
version: osVersion,
|
|
38
|
+
architecture: '',
|
|
27
39
|
});
|
|
28
40
|
|
|
41
|
+
let deviceName = '';
|
|
42
|
+
if (Platform.OS === 'android') {
|
|
43
|
+
// Example: "Google Pixel 7"
|
|
44
|
+
const prefix =
|
|
45
|
+
Platform.constants.Manufacturer.toLowerCase() ===
|
|
46
|
+
Platform.constants.Brand.toLowerCase()
|
|
47
|
+
? Platform.constants.Manufacturer
|
|
48
|
+
: `${Platform.constants.Manufacturer} ${Platform.constants.Brand}`;
|
|
49
|
+
deviceName = `${prefix} ${Platform.constants.Model}`;
|
|
50
|
+
} else if (Platform.OS === 'ios') {
|
|
51
|
+
// note: osName check is necessary because Platform.isPad is not reliable
|
|
52
|
+
deviceName = Platform.isPad || osName === 'iPadOS' ? 'iPad' : 'iPhone';
|
|
53
|
+
}
|
|
54
|
+
|
|
29
55
|
setDeviceInfo({
|
|
30
|
-
|
|
31
|
-
name: `${deviceInfo.getManufacturerSync()} ${
|
|
32
|
-
deviceInfo.getModel() ?? deviceInfo.getDeviceId()
|
|
33
|
-
} ${deviceInfo.getDeviceType()}`,
|
|
56
|
+
name: deviceName,
|
|
34
57
|
version: '',
|
|
35
58
|
});
|
|
36
59
|
};
|