@stream-io/video-react-native-sdk 0.0.4 → 0.0.5
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 +7 -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/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/utils/setClientDetails.ts +32 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [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)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* 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))
|
|
11
|
+
|
|
5
12
|
### [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
13
|
|
|
7
14
|
|
|
@@ -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,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
|
|
|
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;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C"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.5";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '0.0.
|
|
1
|
+
export const version = '0.0.5';
|
|
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.5",
|
|
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
|
|
|
@@ -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
|
};
|