@stream-io/video-react-native-sdk 0.0.1-alpha.202 → 0.0.1-alpha.204
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 +13 -0
- package/dist/index.js +2 -8
- package/dist/index.js.map +1 -1
- package/dist/src/utils/device-info/libs.d.ts +2 -0
- package/dist/src/utils/device-info/libs.js +16 -0
- package/dist/src/utils/device-info/libs.js.map +1 -0
- package/dist/src/utils/setClientDetails.d.ts +1 -0
- package/dist/src/utils/setClientDetails.js +28 -0
- package/dist/src/utils/setClientDetails.js.map +1 -0
- package/index.ts +2 -8
- package/package.json +5 -3
- package/src/utils/device-info/libs.ts +17 -0
- package/src/utils/setClientDetails.ts +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.1-alpha.204](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.203...@stream-io/video-react-native-sdk-0.0.1-alpha.204) (2023-06-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **react-native:** send device and os info from the SDK ([#690](https://github.com/GetStream/stream-video-js/issues/690)) ([deb1a28](https://github.com/GetStream/stream-video-js/commit/deb1a28a4a029d988d11970608f00da8b327a02d))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.0.1-alpha.203](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.202...@stream-io/video-react-native-sdk-0.0.1-alpha.203) (2023-06-23)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
## [0.0.1-alpha.202](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.201...@stream-io/video-react-native-sdk-0.0.1-alpha.202) (2023-06-22)
|
|
6
19
|
|
|
7
20
|
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.StreamCall = exports.StreamVideo = void 0;
|
|
18
|
-
const
|
|
18
|
+
const setClientDetails_1 = require("./src/utils/setClientDetails");
|
|
19
19
|
__exportStar(require("@stream-io/i18n"), exports);
|
|
20
20
|
__exportStar(require("@stream-io/video-client"), exports);
|
|
21
21
|
__exportStar(require("@stream-io/video-react-bindings"), exports);
|
|
@@ -29,11 +29,5 @@ __exportStar(require("./src/utils"), exports);
|
|
|
29
29
|
var providers_1 = require("./src/providers");
|
|
30
30
|
Object.defineProperty(exports, "StreamVideo", { enumerable: true, get: function () { return providers_1.StreamVideo; } });
|
|
31
31
|
Object.defineProperty(exports, "StreamCall", { enumerable: true, get: function () { return providers_1.StreamCall; } });
|
|
32
|
-
|
|
33
|
-
(0, video_client_1.setSdkInfo)({
|
|
34
|
-
type: video_client_1.SfuModels.SdkType.REACT_NATIVE,
|
|
35
|
-
major: '0',
|
|
36
|
-
minor: '0',
|
|
37
|
-
patch: '0',
|
|
38
|
-
});
|
|
32
|
+
(0, setClientDetails_1.setClientDetails)();
|
|
39
33
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mEAAgE;AAEhE,kDAAgC;AAChC,0DAAwC;AACxC,kEAAgD;AAChD,mDAAiC;AACjC,iDAA+B;AAC/B,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAE5B,kEAAkE;AAClE,gDAAgD;AAChD,6CAA0D;AAAjD,wGAAA,WAAW,OAAA;AAAE,uGAAA,UAAU,OAAA;AAEhC,IAAA,mCAAgB,GAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDeviceInfoLib = void 0;
|
|
4
|
+
let deviceInfo;
|
|
5
|
+
try {
|
|
6
|
+
deviceInfo = require('react-native-device-info').default;
|
|
7
|
+
}
|
|
8
|
+
catch (e) { }
|
|
9
|
+
function getDeviceInfoLib() {
|
|
10
|
+
if (!deviceInfo) {
|
|
11
|
+
throw Error('react-native-device-info library is not installed. Please see https://github.com/react-native-device-info/react-native-device-info#installation for installation instructions');
|
|
12
|
+
}
|
|
13
|
+
return deviceInfo;
|
|
14
|
+
}
|
|
15
|
+
exports.getDeviceInfoLib = getDeviceInfoLib;
|
|
16
|
+
//# sourceMappingURL=libs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libs.js","sourceRoot":"","sources":["../../../../src/utils/device-info/libs.ts"],"names":[],"mappings":";;;AAGA,IAAI,UAAwC,CAAC;AAE7C,IAAI;IACF,UAAU,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC;CAC1D;AAAC,OAAO,CAAC,EAAE,GAAE;AAEd,SAAgB,gBAAgB;IAC9B,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,KAAK,CACT,+KAA+K,CAChL,CAAC;KACH;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAPD,4CAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setClientDetails: () => void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setClientDetails = void 0;
|
|
4
|
+
const video_client_1 = require("@stream-io/video-client");
|
|
5
|
+
const libs_1 = require("./device-info/libs");
|
|
6
|
+
const react_native_1 = require("react-native");
|
|
7
|
+
const setClientDetails = () => {
|
|
8
|
+
// TODO: set valid version
|
|
9
|
+
(0, video_client_1.setSdkInfo)({
|
|
10
|
+
type: video_client_1.SfuModels.SdkType.REACT_NATIVE,
|
|
11
|
+
major: '0',
|
|
12
|
+
minor: '0',
|
|
13
|
+
patch: '0',
|
|
14
|
+
});
|
|
15
|
+
const deviceInfo = (0, libs_1.getDeviceInfoLib)();
|
|
16
|
+
(0, video_client_1.setOSInfo)({
|
|
17
|
+
name: react_native_1.Platform.OS,
|
|
18
|
+
version: deviceInfo.getSystemVersion(),
|
|
19
|
+
architecture: deviceInfo.supportedAbisSync().join(','),
|
|
20
|
+
});
|
|
21
|
+
(0, video_client_1.setDeviceInfo)({
|
|
22
|
+
// Apple iPhone SE Handset, Google sdk_gphone64_x86_64 Handset
|
|
23
|
+
name: `${deviceInfo.getManufacturerSync()} ${deviceInfo.getModel() ?? deviceInfo.getDeviceId()} ${deviceInfo.getDeviceType()}`,
|
|
24
|
+
version: '',
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
exports.setClientDetails = setClientDetails;
|
|
28
|
+
//# sourceMappingURL=setClientDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setClientDetails.js","sourceRoot":"","sources":["../../../src/utils/setClientDetails.ts"],"names":[],"mappings":";;;AAAA,0DAKiC;AACjC,6CAAsD;AACtD,+CAAwC;AAEjC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,0BAA0B;IAC1B,IAAA,yBAAU,EAAC;QACT,IAAI,EAAE,wBAAS,CAAC,OAAO,CAAC,YAAY;QACpC,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,GAAG;KACX,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,IAAA,uBAAgB,GAAE,CAAC;IAEtC,IAAA,wBAAS,EAAC;QACR,IAAI,EAAE,uBAAQ,CAAC,EAAE;QACjB,OAAO,EAAE,UAAU,CAAC,gBAAgB,EAAE;QACtC,YAAY,EAAE,UAAU,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC;KACvD,CAAC,CAAC;IAEH,IAAA,4BAAa,EAAC;QACZ,8DAA8D;QAC9D,IAAI,EAAE,GAAG,UAAU,CAAC,mBAAmB,EAAE,IACvC,UAAU,CAAC,QAAQ,EAAE,IAAI,UAAU,CAAC,WAAW,EACjD,IAAI,UAAU,CAAC,aAAa,EAAE,EAAE;QAChC,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACL,CAAC,CAAC;AAxBW,QAAA,gBAAgB,oBAwB3B"}
|
package/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setClientDetails } from './src/utils/setClientDetails';
|
|
2
2
|
|
|
3
3
|
export * from '@stream-io/i18n';
|
|
4
4
|
export * from '@stream-io/video-client';
|
|
@@ -13,10 +13,4 @@ export * from './src/utils';
|
|
|
13
13
|
// Explicitly re-exporting to resolve ambiguity.
|
|
14
14
|
export { StreamVideo, StreamCall } from './src/providers';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
setSdkInfo({
|
|
18
|
-
type: SfuModels.SdkType.REACT_NATIVE,
|
|
19
|
-
major: '0',
|
|
20
|
-
minor: '0',
|
|
21
|
-
patch: '0',
|
|
22
|
-
});
|
|
16
|
+
setClientDetails();
|
package/package.json
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@stream-io/i18n": "^0.0.6",
|
|
25
|
-
"@stream-io/video-client": "^0.0.
|
|
26
|
-
"@stream-io/video-react-bindings": "^0.0.
|
|
25
|
+
"@stream-io/video-client": "^0.0.25",
|
|
26
|
+
"@stream-io/video-react-bindings": "^0.0.26"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@notifee/react-native": ">=7.7.0",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"react": ">=17.0.0",
|
|
34
34
|
"react-native": ">=0.67.0",
|
|
35
35
|
"react-native-callkeep": ">=4.3.8",
|
|
36
|
+
"react-native-device-info": ">=10.6.0",
|
|
36
37
|
"react-native-incall-manager": ">=4.0.0",
|
|
37
38
|
"react-native-svg": ">=13.6.0",
|
|
38
39
|
"react-native-voip-push-notification": ">=3.3.1",
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
"jest": "^29.5.0",
|
|
71
72
|
"react-native": "0.71.8",
|
|
72
73
|
"react-native-callkeep": "4.3.8",
|
|
74
|
+
"react-native-device-info": "^10.6.0",
|
|
73
75
|
"react-native-incall-manager": "^4.0.0",
|
|
74
76
|
"react-native-svg": "^13.6.0",
|
|
75
77
|
"react-native-voip-push-notification": "3.3.1",
|
|
@@ -83,5 +85,5 @@
|
|
|
83
85
|
"typedoc-plugin-markdown": "^3.15.3",
|
|
84
86
|
"typescript": "^4.9.5"
|
|
85
87
|
},
|
|
86
|
-
"version": "0.0.1-alpha.
|
|
88
|
+
"version": "0.0.1-alpha.204"
|
|
87
89
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type RNDeviceInfoType =
|
|
2
|
+
typeof import('react-native-device-info').default;
|
|
3
|
+
|
|
4
|
+
let deviceInfo: RNDeviceInfoType | undefined;
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
deviceInfo = require('react-native-device-info').default;
|
|
8
|
+
} catch (e) {}
|
|
9
|
+
|
|
10
|
+
export function getDeviceInfoLib() {
|
|
11
|
+
if (!deviceInfo) {
|
|
12
|
+
throw Error(
|
|
13
|
+
'react-native-device-info library is not installed. Please see https://github.com/react-native-device-info/react-native-device-info#installation for installation instructions',
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
return deviceInfo;
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setSdkInfo,
|
|
3
|
+
setDeviceInfo,
|
|
4
|
+
setOSInfo,
|
|
5
|
+
SfuModels,
|
|
6
|
+
} from '@stream-io/video-client';
|
|
7
|
+
import { getDeviceInfoLib } from './device-info/libs';
|
|
8
|
+
import { Platform } from 'react-native';
|
|
9
|
+
|
|
10
|
+
export const setClientDetails = () => {
|
|
11
|
+
// TODO: set valid version
|
|
12
|
+
setSdkInfo({
|
|
13
|
+
type: SfuModels.SdkType.REACT_NATIVE,
|
|
14
|
+
major: '0',
|
|
15
|
+
minor: '0',
|
|
16
|
+
patch: '0',
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const deviceInfo = getDeviceInfoLib();
|
|
20
|
+
|
|
21
|
+
setOSInfo({
|
|
22
|
+
name: Platform.OS,
|
|
23
|
+
version: deviceInfo.getSystemVersion(),
|
|
24
|
+
architecture: deviceInfo.supportedAbisSync().join(','),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
setDeviceInfo({
|
|
28
|
+
// Apple iPhone SE Handset, Google sdk_gphone64_x86_64 Handset
|
|
29
|
+
name: `${deviceInfo.getManufacturerSync()} ${
|
|
30
|
+
deviceInfo.getModel() ?? deviceInfo.getDeviceId()
|
|
31
|
+
} ${deviceInfo.getDeviceType()}`,
|
|
32
|
+
version: '',
|
|
33
|
+
});
|
|
34
|
+
};
|