@stream-io/video-react-native-sdk 0.0.1-alpha.203 → 0.0.1-alpha.205
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/hooks/push/useIosCallKeepEventsSetupEffect.js +1 -1
- package/dist/src/hooks/push/useIosCallKeepEventsSetupEffect.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/push/ios.d.ts +1 -1
- package/dist/src/utils/push/ios.js +1 -3
- package/dist/src/utils/push/ios.js.map +1 -1
- 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/hooks/push/useIosCallKeepEventsSetupEffect.ts +1 -1
- package/src/utils/device-info/libs.ts +17 -0
- package/src/utils/push/ios.ts +0 -3
- 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.205](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.204...@stream-io/video-react-native-sdk-0.0.1-alpha.205) (2023-06-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [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)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **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))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
## [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)
|
|
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"}
|
|
@@ -20,7 +20,7 @@ const useIosCallKeepEventsSetupEffect = () => {
|
|
|
20
20
|
const callkeep = (0, libs_1.getCallKeepLib)();
|
|
21
21
|
callkeep.addEventListener('answerCall', ({ callUUID }) => {
|
|
22
22
|
const call_cid = video_client_1.RxUtils.getCurrentValue(rxSubjects_1.voipPushNotificationCallCId$);
|
|
23
|
-
(0, ios_1.iosCallkeepAcceptCall)(call_cid, callUUID
|
|
23
|
+
(0, ios_1.iosCallkeepAcceptCall)(call_cid, callUUID);
|
|
24
24
|
});
|
|
25
25
|
callkeep.addEventListener('endCall', ({ callUUID }) => {
|
|
26
26
|
const call_cid = video_client_1.RxUtils.getCurrentValue(rxSubjects_1.voipPushNotificationCallCId$);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIosCallKeepEventsSetupEffect.js","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallKeepEventsSetupEffect.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAClC,4DAA2E;AAC3E,0DAAkD;AAClD,8CAG8B;AAC9B,gDAAuD;AACvD,uCAA4C;AAC5C,+CAAwC;AAExC;;GAEG;AACI,MAAM,+BAA+B,GAAG,GAAG,EAAE;IAClD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,qBAAa,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC;QAClD,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,UAAU,EAAE;YACxC,OAAO;SACR;QACD,MAAM,QAAQ,GAAG,IAAA,qBAAc,GAAE,CAAC;QAElC,QAAQ,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACvD,MAAM,QAAQ,GAAG,sBAAO,CAAC,eAAe,CAAC,yCAA4B,CAAC,CAAC;YACvE,IAAA,2BAAqB,EAAC,QAAQ,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"useIosCallKeepEventsSetupEffect.js","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallKeepEventsSetupEffect.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAClC,4DAA2E;AAC3E,0DAAkD;AAClD,8CAG8B;AAC9B,gDAAuD;AACvD,uCAA4C;AAC5C,+CAAwC;AAExC;;GAEG;AACI,MAAM,+BAA+B,GAAG,GAAG,EAAE;IAClD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,qBAAa,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC;QAClD,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,UAAU,EAAE;YACxC,OAAO;SACR;QACD,MAAM,QAAQ,GAAG,IAAA,qBAAc,GAAE,CAAC;QAElC,QAAQ,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACvD,MAAM,QAAQ,GAAG,sBAAO,CAAC,eAAe,CAAC,yCAA4B,CAAC,CAAC;YACvE,IAAA,2BAAqB,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACpD,MAAM,QAAQ,GAAG,sBAAO,CAAC,eAAe,CAAC,yCAA4B,CAAC,CAAC;YACvE,IAAA,2BAAqB,EAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;YAC3C,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC1C,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CAAC;AAtBW,QAAA,+BAA+B,mCAsB1C"}
|
|
@@ -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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StreamVideoConfig } from '../StreamVideoRN/types';
|
|
2
2
|
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
3
|
-
export declare const iosCallkeepAcceptCall: (call_cid: string | undefined, callUUIDFromCallkeep: string
|
|
3
|
+
export declare const iosCallkeepAcceptCall: (call_cid: string | undefined, callUUIDFromCallkeep: string) => void;
|
|
4
4
|
export declare const iosCallkeepRejectCall: (call_cid: string | undefined, callUUIDFromCallkeep: string, pushConfig: PushConfig) => Promise<void>;
|
|
5
5
|
export {};
|
|
@@ -3,14 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.iosCallkeepRejectCall = exports.iosCallkeepAcceptCall = void 0;
|
|
4
4
|
const rxSubjects_1 = require("./rxSubjects");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
|
-
const iosCallkeepAcceptCall = (call_cid, callUUIDFromCallkeep
|
|
6
|
+
const iosCallkeepAcceptCall = (call_cid, callUUIDFromCallkeep) => {
|
|
7
7
|
if (!shouldProcessCallFromCallkeep(call_cid, callUUIDFromCallkeep)) {
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
10
|
rxSubjects_1.pushAcceptedIncomingCallCId$.next(call_cid);
|
|
11
11
|
rxSubjects_1.voipPushNotificationCallCId$.next(undefined);
|
|
12
|
-
// navigate to the call screen
|
|
13
|
-
pushConfig.navigateAcceptCall();
|
|
14
12
|
};
|
|
15
13
|
exports.iosCallkeepAcceptCall = iosCallkeepAcceptCall;
|
|
16
14
|
const iosCallkeepRejectCall = async (call_cid, callUUIDFromCallkeep, pushConfig) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios.js","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":";;;AACA,6CAIsB;AACtB,mCAA0D;AAInD,MAAM,qBAAqB,GAAG,CACnC,QAA4B,EAC5B,oBAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"ios.js","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":";;;AACA,6CAIsB;AACtB,mCAA0D;AAInD,MAAM,qBAAqB,GAAG,CACnC,QAA4B,EAC5B,oBAA4B,EAC5B,EAAE;IACF,IAAI,CAAC,6BAA6B,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE;QAClE,OAAO;KACR;IACD,yCAA4B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,yCAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC,CAAC;AATW,QAAA,qBAAqB,yBAShC;AAEK,MAAM,qBAAqB,GAAG,KAAK,EACxC,QAA4B,EAC5B,oBAA4B,EAC5B,UAAsB,EACtB,EAAE;IACF,IAAI,CAAC,6BAA6B,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE;QAClE,OAAO;KACR;IACD,yCAA4B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,yCAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,IAAI,yCAA4B,CAAC,QAAQ,EAAE;QACzC,gEAAgE;QAChE,OAAO;KACR;IACD,MAAM,IAAA,uCAA+B,EAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AACzE,CAAC,CAAC;AAfW,QAAA,qBAAqB,yBAehC;AAEF;;;KAGK;AACL,MAAM,6BAA6B,GAAG,CACpC,QAA4B,EAC5B,oBAA4B,EACR,EAAE;IACtB,IAAI,CAAC,QAAQ,IAAI,CAAC,oBAAoB,EAAE;QACtC,OAAO,KAAK,CAAC;KACd;IACD,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,OAAO,MAAM,KAAK,oBAAoB,CAAC;AACzC,CAAC,CAAC"}
|
|
@@ -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.205"
|
|
87
89
|
}
|
|
@@ -22,7 +22,7 @@ export const useIosCallKeepEventsSetupEffect = () => {
|
|
|
22
22
|
|
|
23
23
|
callkeep.addEventListener('answerCall', ({ callUUID }) => {
|
|
24
24
|
const call_cid = RxUtils.getCurrentValue(voipPushNotificationCallCId$);
|
|
25
|
-
iosCallkeepAcceptCall(call_cid, callUUID
|
|
25
|
+
iosCallkeepAcceptCall(call_cid, callUUID);
|
|
26
26
|
});
|
|
27
27
|
callkeep.addEventListener('endCall', ({ callUUID }) => {
|
|
28
28
|
const call_cid = RxUtils.getCurrentValue(voipPushNotificationCallCId$);
|
|
@@ -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
|
+
}
|
package/src/utils/push/ios.ts
CHANGED
|
@@ -11,15 +11,12 @@ type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
|
11
11
|
export const iosCallkeepAcceptCall = (
|
|
12
12
|
call_cid: string | undefined,
|
|
13
13
|
callUUIDFromCallkeep: string,
|
|
14
|
-
pushConfig: PushConfig,
|
|
15
14
|
) => {
|
|
16
15
|
if (!shouldProcessCallFromCallkeep(call_cid, callUUIDFromCallkeep)) {
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
18
|
pushAcceptedIncomingCallCId$.next(call_cid);
|
|
20
19
|
voipPushNotificationCallCId$.next(undefined);
|
|
21
|
-
// navigate to the call screen
|
|
22
|
-
pushConfig.navigateAcceptCall();
|
|
23
20
|
};
|
|
24
21
|
|
|
25
22
|
export const iosCallkeepRejectCall = async (
|
|
@@ -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
|
+
};
|