@stream-io/video-react-native-sdk 1.34.0 → 1.36.0
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 +32 -0
- package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js +9 -2
- package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js +9 -2
- package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js +11 -12
- package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/TextBasedIndicator.js +7 -2
- package/dist/commonjs/components/Call/RingingCallContent/TextBasedIndicator.js.map +1 -1
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js +7 -3
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/commonjs/hooks/push/index.js +0 -4
- package/dist/commonjs/hooks/push/index.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +6 -0
- package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +0 -17
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +55 -32
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +2 -0
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +10 -93
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/index.js +0 -11
- package/dist/commonjs/utils/push/index.js.map +1 -1
- package/dist/commonjs/utils/push/internal/utils.js +2 -31
- package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
- package/dist/commonjs/utils/push/libs/callingx.js +9 -0
- package/dist/commonjs/utils/push/libs/callingx.js.map +1 -1
- package/dist/commonjs/utils/push/libs/index.js +0 -33
- package/dist/commonjs/utils/push/libs/index.js.map +1 -1
- package/dist/commonjs/utils/push/utils.js +0 -28
- package/dist/commonjs/utils/push/utils.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/RingingCallContent/IncomingCall.js +9 -2
- package/dist/module/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/OutgoingCall.js +9 -2
- package/dist/module/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/RingingCallContent.js +11 -12
- package/dist/module/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/TextBasedIndicator.js +7 -2
- package/dist/module/components/Call/RingingCallContent/TextBasedIndicator.js.map +1 -1
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js +7 -3
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/module/hooks/push/index.js +0 -4
- package/dist/module/hooks/push/index.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +6 -0
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +0 -17
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/callingx/callingx.js +56 -33
- package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/module/utils/internal/registerSDKGlobals.js +2 -0
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +11 -92
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/index.js +0 -1
- package/dist/module/utils/push/index.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +0 -28
- package/dist/module/utils/push/internal/utils.js.map +1 -1
- package/dist/module/utils/push/libs/callingx.js +9 -0
- package/dist/module/utils/push/libs/callingx.js.map +1 -1
- package/dist/module/utils/push/libs/index.js +0 -3
- package/dist/module/utils/push/libs/index.js.map +1 -1
- package/dist/module/utils/push/utils.js +0 -25
- package/dist/module/utils/push/utils.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/RingingCallContent/IncomingCall.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/OutgoingCall.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/RingingCallContent.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/TextBasedIndicator.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -1
- package/dist/typescript/hooks/push/index.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +0 -7
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +19 -40
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
- package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts +1 -6
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/index.d.ts +0 -1
- package/dist/typescript/utils/push/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/utils.d.ts +2 -10
- package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/callingx.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +16 -2
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/index.d.ts +0 -3
- package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/utils.d.ts +0 -6
- package/dist/typescript/utils/push/utils.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/expo-config-plugin/dist/withAppDelegate.js +56 -0
- package/ios/StreamVideoReactNative.h +14 -0
- package/ios/StreamVideoReactNative.m +129 -7
- package/package.json +4 -14
- package/src/components/Call/RingingCallContent/IncomingCall.tsx +14 -2
- package/src/components/Call/RingingCallContent/OutgoingCall.tsx +14 -2
- package/src/components/Call/RingingCallContent/RingingCallContent.tsx +7 -12
- package/src/components/Call/RingingCallContent/TextBasedIndicator.tsx +13 -2
- package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +10 -2
- package/src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx +1 -1
- package/src/hooks/push/index.ts +0 -4
- package/src/modules/call-manager/CallManager.ts +6 -0
- package/src/utils/StreamVideoRN/index.ts +0 -22
- package/src/utils/StreamVideoRN/types.ts +19 -46
- package/src/utils/internal/callingx/callingx.ts +60 -29
- package/src/utils/internal/registerSDKGlobals.ts +2 -0
- package/src/utils/push/android.ts +11 -117
- package/src/utils/push/index.ts +0 -1
- package/src/utils/push/internal/utils.ts +1 -41
- package/src/utils/push/libs/callingx.ts +12 -0
- package/src/utils/push/libs/index.ts +0 -3
- package/src/utils/push/utils.ts +0 -37
- package/src/version.ts +1 -1
- package/dist/commonjs/hooks/push/useIosInitRemoteNotifications.js +0 -33
- package/dist/commonjs/hooks/push/useIosInitRemoteNotifications.js.map +0 -1
- package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js +0 -49
- package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js.map +0 -1
- package/dist/commonjs/utils/internal/newNotificationCallbacks.js +0 -17
- package/dist/commonjs/utils/internal/newNotificationCallbacks.js.map +0 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js +0 -13
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +0 -1
- package/dist/commonjs/utils/push/ios.js +0 -158
- package/dist/commonjs/utils/push/ios.js.map +0 -1
- package/dist/commonjs/utils/push/libs/expoNotifications.js +0 -25
- package/dist/commonjs/utils/push/libs/expoNotifications.js.map +0 -1
- package/dist/commonjs/utils/push/libs/iosPushNotification.js +0 -17
- package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +0 -1
- package/dist/commonjs/utils/push/libs/notifee/index.js +0 -38
- package/dist/commonjs/utils/push/libs/notifee/index.js.map +0 -1
- package/dist/commonjs/utils/push/libs/notifee/lib.js +0 -16
- package/dist/commonjs/utils/push/libs/notifee/lib.js.map +0 -1
- package/dist/module/hooks/push/useIosInitRemoteNotifications.js +0 -27
- package/dist/module/hooks/push/useIosInitRemoteNotifications.js.map +0 -1
- package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js +0 -43
- package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js.map +0 -1
- package/dist/module/utils/internal/newNotificationCallbacks.js +0 -10
- package/dist/module/utils/internal/newNotificationCallbacks.js.map +0 -1
- package/dist/module/utils/push/internal/rxSubjects.js +0 -7
- package/dist/module/utils/push/internal/rxSubjects.js.map +0 -1
- package/dist/module/utils/push/ios.js +0 -148
- package/dist/module/utils/push/ios.js.map +0 -1
- package/dist/module/utils/push/libs/expoNotifications.js +0 -18
- package/dist/module/utils/push/libs/expoNotifications.js.map +0 -1
- package/dist/module/utils/push/libs/iosPushNotification.js +0 -11
- package/dist/module/utils/push/libs/iosPushNotification.js.map +0 -1
- package/dist/module/utils/push/libs/notifee/index.js +0 -31
- package/dist/module/utils/push/libs/notifee/index.js.map +0 -1
- package/dist/module/utils/push/libs/notifee/lib.js +0 -11
- package/dist/module/utils/push/libs/notifee/lib.js.map +0 -1
- package/dist/typescript/hooks/push/useIosInitRemoteNotifications.d.ts +0 -5
- package/dist/typescript/hooks/push/useIosInitRemoteNotifications.d.ts.map +0 -1
- package/dist/typescript/hooks/push/useProcessPushNonRingingCallEffect.d.ts +0 -7
- package/dist/typescript/hooks/push/useProcessPushNonRingingCallEffect.d.ts.map +0 -1
- package/dist/typescript/utils/internal/newNotificationCallbacks.d.ts +0 -10
- package/dist/typescript/utils/internal/newNotificationCallbacks.d.ts.map +0 -1
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts +0 -11
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +0 -1
- package/dist/typescript/utils/push/ios.d.ts +0 -14
- package/dist/typescript/utils/push/ios.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/expoNotifications.d.ts +0 -6
- package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/iosPushNotification.d.ts +0 -5
- package/dist/typescript/utils/push/libs/iosPushNotification.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/notifee/index.d.ts +0 -23
- package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/notifee/lib.d.ts +0 -4
- package/dist/typescript/utils/push/libs/notifee/lib.d.ts.map +0 -1
- package/src/hooks/push/useIosInitRemoteNotifications.ts +0 -29
- package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +0 -50
- package/src/utils/internal/newNotificationCallbacks.ts +0 -29
- package/src/utils/push/internal/rxSubjects.ts +0 -10
- package/src/utils/push/ios.ts +0 -207
- package/src/utils/push/libs/expoNotifications.ts +0 -32
- package/src/utils/push/libs/iosPushNotification.ts +0 -22
- package/src/utils/push/libs/notifee/index.ts +0 -41
- package/src/utils/push/libs/notifee/lib.ts +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,KAAK,IAAI,EACV,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,KAAK,IAAI,EACV,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,mBAAmB,GACnB,aAAa,CAAC;AAElB,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;;WAIG;QACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;QAEtC,GAAG,CAAC,EAAE;YACJ;;;;eAIG;YACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;YACxB;;;eAGG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YACf;;;eAGG;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB;;;eAGG;YACH,YAAY,CAAC,EAAE,OAAO,CAAC;YACvB;;;eAGG;YACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;YAC5B;;;eAGG;YACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;YAC7B;;;;;;eAMG;YACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;YACvC;;;;;eAKG;YACH,yBAAyB,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;SACpD,CAAC;QACF,OAAO,CAAC,EAAE;YACR;;;;eAIG;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB;;;;eAIG;YACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAC1B;;;;;;;;;eASG;YACH,eAAe,CAAC,EAAE,oBAAoB,CAAC;YACvC;;;;;;;;eAQG;YACH,iBAAiB,CAAC,EAAE;gBAClB,SAAS,CAAC,EAAE,MAAM,CAAC;gBACnB,SAAS,CAAC,EAAE,MAAM,CAAC;aACpB,CAAC;YACF;;eAEG;YACH,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC;YACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC;YAC7B;;;;eAIG;YACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;SACxC,CAAC;QACF;;;WAGG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC;;;;;;;;;;;;;;;;;WAiBG;QACH,uBAAuB,EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;KACvE,CAAC;IACF,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP;;eAEG;YACH,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC;YAC3D;;eAEG;YACH,iBAAiB,EAAE,iCAAiC,CAAC;YACrD;;;eAGG;YACH,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;SAC1C,CAAC;KACH,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/internal/callingx/callingx.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/internal/callingx/callingx.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAcjC;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,cAAc,EAAE,GAAG,SAAS,EACzC,YAAY,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAClD,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,CA8BR;AAaD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,iBA2BpD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,iBA6FrE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,aAAa,iBAmBvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerSDKGlobals.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/registerSDKGlobals.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registerSDKGlobals.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/registerSDKGlobals.ts"],"names":[],"mappings":"AA2GA,wBAAgB,kBAAkB,SAIjC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { StreamVideoClient } from '@stream-io/video-client';
|
|
2
2
|
import type { StreamVideoConfig } from '../StreamVideoRN/types';
|
|
3
|
-
import { type FirebaseMessagingTypes
|
|
3
|
+
import { type FirebaseMessagingTypes } from './libs';
|
|
4
4
|
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
5
|
-
type onBackgroundEventFunctionParams = Parameters<NotifeeLib['default']['onBackgroundEvent']>[0];
|
|
6
|
-
type Event = Parameters<onBackgroundEventFunctionParams>[0];
|
|
7
5
|
/** Send token to stream */
|
|
8
6
|
export declare function initAndroidPushToken(client: StreamVideoClient, pushConfig: PushConfig, setUnsubscribeListener: (unsubscribe: () => void) => void): Promise<void>;
|
|
9
7
|
/**
|
|
@@ -11,8 +9,5 @@ export declare function initAndroidPushToken(client: StreamVideoClient, pushConf
|
|
|
11
9
|
* For Ringing and Non-Ringing calls.
|
|
12
10
|
*/
|
|
13
11
|
export declare const firebaseDataHandler: (data: FirebaseMessagingTypes.RemoteMessage["data"]) => Promise<void>;
|
|
14
|
-
export declare const onAndroidNotifeeEvent: ({ event }: {
|
|
15
|
-
event: Event;
|
|
16
|
-
}) => Promise<void>;
|
|
17
12
|
export {};
|
|
18
13
|
//# sourceMappingURL=android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EACL,KAAK,sBAAsB,EAG5B,MAAM,QAAQ,CAAC;AAOhB,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAIzD,4BAA4B;AAC5B,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBAgD1D;AAED;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,sBAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,kBA+NnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Call
|
|
2
|
-
import type {
|
|
1
|
+
import { Call } from '@stream-io/video-client';
|
|
2
|
+
import type { StreamVideoConfig } from '../../StreamVideoRN/types';
|
|
3
3
|
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
4
4
|
type CanAddPushWSSubscriptionsRef = {
|
|
5
5
|
current: boolean;
|
|
@@ -20,14 +20,6 @@ export declare const processCallFromPushInBackground: (pushConfig: PushConfig, c
|
|
|
20
20
|
* This means we wait until call.get() is done and call.join() or call.leave() is invoked (not completed) to fulfill the action
|
|
21
21
|
*/
|
|
22
22
|
onIOSActionCanBeFulfilled: (didFail: boolean) => void) => Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* This function is used process the call from push notifications due to non ringing calls
|
|
25
|
-
* It does the following steps:
|
|
26
|
-
* 1. Get the call from the client if present or create a new call
|
|
27
|
-
* 2. Fetch the latest state of the call from the server
|
|
28
|
-
* 3. Call all the callbacks to inform the app about the call
|
|
29
|
-
*/
|
|
30
|
-
export declare const processNonIncomingCallFromPush: (client: StreamVideoClient, call_cid: string, nonRingingNotificationType: NonRingingPushEvent) => Promise<void>;
|
|
31
23
|
/**
|
|
32
24
|
* This function is used to clear all the push related WS subscriptions
|
|
33
25
|
* note: events are subscribed in push for accept/decline through WS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAIL,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAKnE,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAGzD,KAAK,4BAA4B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,cAAc,IAAI,EAClB,eAAe,MAAM,GAAG,SAAS,EACjC,aAAa,MAAM,GAAG,SAAS;;;CAoChC,CAAC;AAMF,eAAO,MAAM,+BAA+B,GAC1C,YAAY,UAAU,EACtB,UAAU,MAAM,EAChB,QAAQ,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,qBAAqB;AAChE;;;;;GAKG;AACH,2BAA2B,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,kBAmFtD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GAAI,UAAU,MAAM,SAM7D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,4BAE1C,CAAC;AAEF,eAAO,MAAM,aAAa,eACkD,CAAC;AAE7E,eAAO,MAAM,kBAAkB,GAC7B,MAAM,IAAI,EACV,UAAU;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE;;;CAW7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/callingx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,MAAM,cAAc,GACxB,OAAO,kCAAkC,EAAE,eAAe,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,OAAO,kCAAkC,EAAE,SAAS,CAAC;AAC7E,MAAM,MAAM,WAAW,GACrB,OAAO,kCAAkC,EAAE,WAAW,CAAC;AACzD,MAAM,MAAM,iBAAiB,GAC3B,OAAO,kCAAkC,EAAE,iBAAiB,CAAC;AAQ/D,wBAAgB,cAAc,+DAK7B;AAED,wBAAgB,yBAAyB,2EAExC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,iBAAiB,GACxB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/callingx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,MAAM,cAAc,GACxB,OAAO,kCAAkC,EAAE,eAAe,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,OAAO,kCAAkC,EAAE,SAAS,CAAC;AAC7E,MAAM,MAAM,WAAW,GACrB,OAAO,kCAAkC,EAAE,WAAW,CAAC;AACzD,MAAM,MAAM,iBAAiB,GAC3B,OAAO,kCAAkC,EAAE,iBAAiB,CAAC;AAQ/D,wBAAgB,cAAc,+DAK7B;AAED,wBAAgB,yBAAyB,2EAExC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,iBAAiB,GACxB,iBAAiB,CAyEnB"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { type Type } from './lib';
|
|
2
2
|
export type { FirebaseMessagingTypes } from '@react-native-firebase/messaging';
|
|
3
3
|
export type FirebaseMessagingType = Type;
|
|
4
|
-
export declare function getFirebaseMessagingLib():
|
|
5
|
-
|
|
4
|
+
export declare function getFirebaseMessagingLib(): {
|
|
5
|
+
(app?: import("@react-native-firebase/app").ReactNativeFirebase.FirebaseApp): import("@react-native-firebase/messaging").Messaging;
|
|
6
|
+
readonly SDK_VERSION: string;
|
|
7
|
+
} & import("@react-native-firebase/messaging/dist/typescript/lib/types/messaging").Statics & {
|
|
8
|
+
messaging: import("@react-native-firebase/app").ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<import("@react-native-firebase/messaging").Messaging, import("@react-native-firebase/messaging/dist/typescript/lib/types/messaging").Statics>;
|
|
9
|
+
firebase: import("@react-native-firebase/app").ReactNativeFirebase.Module;
|
|
10
|
+
app(name?: string): import("@react-native-firebase/app").ReactNativeFirebase.FirebaseApp;
|
|
11
|
+
};
|
|
12
|
+
export declare function getFirebaseMessagingLibNoThrow(isExpo: boolean): ({
|
|
13
|
+
(app?: import("@react-native-firebase/app").ReactNativeFirebase.FirebaseApp): import("@react-native-firebase/messaging").Messaging;
|
|
14
|
+
readonly SDK_VERSION: string;
|
|
15
|
+
} & import("@react-native-firebase/messaging/dist/typescript/lib/types/messaging").Statics & {
|
|
16
|
+
messaging: import("@react-native-firebase/app").ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<import("@react-native-firebase/messaging").Messaging, import("@react-native-firebase/messaging/dist/typescript/lib/types/messaging").Statics>;
|
|
17
|
+
firebase: import("@react-native-firebase/app").ReactNativeFirebase.Module;
|
|
18
|
+
app(name?: string): import("@react-native-firebase/app").ReactNativeFirebase.FirebaseApp;
|
|
19
|
+
}) | undefined;
|
|
6
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/firebaseMessaging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAGvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAKzC,wBAAgB,uBAAuB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/firebaseMessaging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAGvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAKzC,wBAAgB,uBAAuB;;;;;;;EAQtC;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,OAAO;;;;;;;eAc7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type { Event } from '@notifee/react-native';
|
|
2
1
|
import type { FirebaseMessagingTypes } from './libs/firebaseMessaging';
|
|
3
|
-
import type { ExpoNotification } from './libs/expoNotifications';
|
|
4
2
|
import type { NonRingingPushEvent } from '../StreamVideoRN/types';
|
|
5
|
-
import type { PushNotificationiOSType } from './libs/iosPushNotification';
|
|
6
3
|
export type StreamPushPayload = {
|
|
7
4
|
call_cid: string;
|
|
8
5
|
type: 'call.ring' | NonRingingPushEvent;
|
|
9
6
|
sender: string;
|
|
10
7
|
} | undefined;
|
|
11
8
|
export declare function isFirebaseStreamVideoMessage(message: FirebaseMessagingTypes.RemoteMessage): boolean;
|
|
12
|
-
export declare function isNotifeeStreamVideoEvent(event: Event): boolean;
|
|
13
|
-
export declare function isExpoNotificationStreamVideoEvent(event: ExpoNotification): boolean;
|
|
14
|
-
export declare function isPushNotificationiOSStreamVideoEvent(notification: PushNotificationiOSType): boolean;
|
|
15
9
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GACzB;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,WAAW,GAAG,mBAAmB,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;CAChB,GACD,SAAS,CAAC;AAEd,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,sBAAsB,CAAC,aAAa,WAG9C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.
|
|
1
|
+
export declare const version = "1.36.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -27,6 +27,8 @@ const withAppDelegate = (configuration, props) => {
|
|
|
27
27
|
addDidFinishLaunchingWithOptionsRingingObjc(config.modResults.contents);
|
|
28
28
|
config.modResults.contents = addDidUpdatePushCredentialsObjc(config.modResults.contents);
|
|
29
29
|
config.modResults.contents = addDidReceiveIncomingPushCallbackObjc(config.modResults.contents);
|
|
30
|
+
config.modResults.contents =
|
|
31
|
+
addDidReceiveIncomingVoIPPushMetadataCallbackObjc(config.modResults.contents);
|
|
30
32
|
}
|
|
31
33
|
return config;
|
|
32
34
|
}
|
|
@@ -75,6 +77,8 @@ const withAppDelegate = (configuration, props) => {
|
|
|
75
77
|
addDidFinishLaunchingWithOptionsRingingSwift(config.modResults.contents);
|
|
76
78
|
config.modResults.contents = addDidUpdatePushCredentialsSwift(config.modResults.contents);
|
|
77
79
|
config.modResults.contents = addDidReceiveIncomingPushCallbackSwift(config.modResults.contents);
|
|
80
|
+
config.modResults.contents =
|
|
81
|
+
addDidReceiveIncomingVoIPPushMetadataCallbackSwift(config.modResults.contents);
|
|
78
82
|
}
|
|
79
83
|
return config;
|
|
80
84
|
}
|
|
@@ -222,4 +226,56 @@ function addDidReceiveIncomingPushCallbackObjc(contents) {
|
|
|
222
226
|
}
|
|
223
227
|
return contents;
|
|
224
228
|
}
|
|
229
|
+
// Injects the iOS 26.4+ VoIP push delegate.
|
|
230
|
+
// - AnyObject for metadata: builds on Xcode older than the iOS 26.4 SDK.
|
|
231
|
+
// - Swift label `didReceiveIncomingVoIPPushWith` (no "Payload") matches the
|
|
232
|
+
// protocol's optional requirement on the iOS 26.4 SDK; combined with
|
|
233
|
+
// `private`, the method is excluded from protocol-conformance checking and
|
|
234
|
+
// Swift auto-derives the same ObjC selector PushKit dispatches on.
|
|
235
|
+
function addDidReceiveIncomingVoIPPushMetadataCallbackSwift(contents) {
|
|
236
|
+
// Match the unique signature, not just the function name: the legacy and
|
|
237
|
+
// new delegates are both 4-arg `pushRegistry(...)` methods, so
|
|
238
|
+
// findSwiftFunctionCodeBlock would confuse them.
|
|
239
|
+
const idempotencyMarker = 'didReceiveIncomingVoIPPushWith payload: PKPushPayload';
|
|
240
|
+
if (contents.includes(idempotencyMarker)) {
|
|
241
|
+
return contents;
|
|
242
|
+
}
|
|
243
|
+
return (0, codeMod_1.insertContentsInsideSwiftClassBlock)(contents, 'class AppDelegate', `
|
|
244
|
+
private func pushRegistry(
|
|
245
|
+
_ registry: PKPushRegistry,
|
|
246
|
+
didReceiveIncomingVoIPPushWith payload: PKPushPayload,
|
|
247
|
+
metadata: AnyObject,
|
|
248
|
+
withCompletionHandler completion: @escaping () -> Void
|
|
249
|
+
) {
|
|
250
|
+
StreamVideoReactNative.didReceiveIncomingVoIPPush(
|
|
251
|
+
payload,
|
|
252
|
+
metadata: metadata,
|
|
253
|
+
completionHandler: completion
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
`, { position: 'tail' });
|
|
257
|
+
}
|
|
258
|
+
// ObjC counterpart of the Swift helper. Uses `id` for the metadata so it
|
|
259
|
+
// builds on Xcode older than the iOS 26.4 SDK. The new selector is different
|
|
260
|
+
// from the legacy one, so findObjcFunctionCodeBlock is safe to use here.
|
|
261
|
+
function addDidReceiveIncomingVoIPPushMetadataCallbackObjc(contents) {
|
|
262
|
+
const onIncomingPush = `
|
|
263
|
+
[StreamVideoReactNative didReceiveIncomingVoIPPush:payload metadata:metadata completionHandler:completion];
|
|
264
|
+
`;
|
|
265
|
+
if (!contents.includes('[StreamVideoReactNative didReceiveIncomingVoIPPush:payload')) {
|
|
266
|
+
const functionSelector = 'pushRegistry:didReceiveIncomingVoIPPushWithPayload:metadata:withCompletionHandler:';
|
|
267
|
+
const codeblock = (0, codeMod_1.findObjcFunctionCodeBlock)(contents, functionSelector);
|
|
268
|
+
if (!codeblock) {
|
|
269
|
+
return (0, addNewLinesToAppDelegateObjc_1.default)(contents, [
|
|
270
|
+
'- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingVoIPPushWithPayload:(PKPushPayload *)payload metadata:(id)metadata withCompletionHandler:(void (^)(void))completion {',
|
|
271
|
+
...onIncomingPush.trim().split('\n'),
|
|
272
|
+
'}',
|
|
273
|
+
]);
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
return (0, codeMod_1.insertContentsInsideObjcFunctionBlock)(contents, functionSelector, onIncomingPush, { position: 'tail' });
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return contents;
|
|
280
|
+
}
|
|
225
281
|
exports.default = withAppDelegate;
|
|
@@ -16,4 +16,18 @@
|
|
|
16
16
|
|
|
17
17
|
+ (void)didReceiveIncomingPush:(PKPushPayload *)payload forType:(NSString *)type completionHandler: (void (^_Nullable)(void)) completion;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* VoIP push entry point for iOS 26.4+. Call from your AppDelegate's
|
|
21
|
+
* `pushRegistry:didReceiveIncomingVoIPPushWithPayload:metadata:withCompletionHandler:`
|
|
22
|
+
* delegate. The SDK reads `mustReport` from `metadata` internally and decides
|
|
23
|
+
* whether to show CallKit and/or forward the push to JS based on the
|
|
24
|
+
* configured options.
|
|
25
|
+
*
|
|
26
|
+
* `metadata` is typed `id` (not `PKVoIPPushMetadata *`) so the call site
|
|
27
|
+
* compiles on Xcode older than the iOS 26.4 SDK.
|
|
28
|
+
*/
|
|
29
|
+
+ (void)didReceiveIncomingVoIPPush:(PKPushPayload *)payload
|
|
30
|
+
metadata:(id _Nullable)metadata
|
|
31
|
+
completionHandler:(void (^_Nullable)(void))completion;
|
|
32
|
+
|
|
19
33
|
@end
|
|
@@ -80,7 +80,7 @@ RCT_EXPORT_MODULE();
|
|
|
80
80
|
#endif
|
|
81
81
|
return YES;
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
SEL selector = @selector(canRegisterCall);
|
|
85
85
|
if (![callingxClass respondsToSelector:selector]) {
|
|
86
86
|
#if DEBUG
|
|
@@ -88,23 +88,61 @@ RCT_EXPORT_MODULE();
|
|
|
88
88
|
#endif
|
|
89
89
|
return YES;
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
NSMethodSignature *signature = [callingxClass methodSignatureForSelector:selector];
|
|
93
93
|
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
|
|
94
94
|
[invocation setTarget:callingxClass];
|
|
95
95
|
[invocation setSelector:selector];
|
|
96
96
|
[invocation invoke];
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
BOOL canRegister = NO;
|
|
99
99
|
[invocation getReturnValue:&canRegister];
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
#if DEBUG
|
|
102
102
|
NSLog(@"[StreamVideoReactNative][canRegisterCall] canRegisterCall = %@", canRegister ? @"YES" : @"NO");
|
|
103
103
|
#endif
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
return canRegister;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
+(BOOL)shouldSkipIncomingPushInForeground {
|
|
109
|
+
Class callingxClass = NSClassFromString(@"Callingx");
|
|
110
|
+
if (!callingxClass) {
|
|
111
|
+
return NO;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
SEL selector = @selector(shouldSkipIncomingPushInForeground);
|
|
115
|
+
if (![callingxClass respondsToSelector:selector]) {
|
|
116
|
+
return NO;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
NSMethodSignature *signature = [callingxClass methodSignatureForSelector:selector];
|
|
120
|
+
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
|
|
121
|
+
[invocation setTarget:callingxClass];
|
|
122
|
+
[invocation setSelector:selector];
|
|
123
|
+
[invocation invoke];
|
|
124
|
+
|
|
125
|
+
BOOL shouldSkip = NO;
|
|
126
|
+
[invocation getReturnValue:&shouldSkip];
|
|
127
|
+
return shouldSkip;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
+(BOOL)isAppInForeground {
|
|
131
|
+
// applicationState must be read on the main thread (PushKit delivers on
|
|
132
|
+
// main, so the common path skips dispatch). Treat Inactive as foreground:
|
|
133
|
+
// covers brief transitions and system overlays.
|
|
134
|
+
__block UIApplicationState state = UIApplicationStateActive;
|
|
135
|
+
void (^readState)(void) = ^{
|
|
136
|
+
state = [UIApplication sharedApplication].applicationState;
|
|
137
|
+
};
|
|
138
|
+
if ([NSThread isMainThread]) {
|
|
139
|
+
readState();
|
|
140
|
+
} else {
|
|
141
|
+
dispatch_sync(dispatch_get_main_queue(), readState);
|
|
142
|
+
}
|
|
143
|
+
return state != UIApplicationStateBackground;
|
|
144
|
+
}
|
|
145
|
+
|
|
108
146
|
+(void)voipRegistration {
|
|
109
147
|
Class voipManagerClass = NSClassFromString(@"Callingx.VoipNotificationsManager");
|
|
110
148
|
if (!voipManagerClass) {
|
|
@@ -166,7 +204,7 @@ RCT_EXPORT_MODULE();
|
|
|
166
204
|
}
|
|
167
205
|
return;
|
|
168
206
|
}
|
|
169
|
-
|
|
207
|
+
|
|
170
208
|
NSString *callCid = streamPayload[@"call_cid"];
|
|
171
209
|
if (!callCid) {
|
|
172
210
|
#if DEBUG
|
|
@@ -177,7 +215,7 @@ RCT_EXPORT_MODULE();
|
|
|
177
215
|
}
|
|
178
216
|
return;
|
|
179
217
|
}
|
|
180
|
-
|
|
218
|
+
|
|
181
219
|
if (![StreamVideoReactNative canRegisterCall]) {
|
|
182
220
|
if (completion) {
|
|
183
221
|
completion();
|
|
@@ -189,6 +227,90 @@ RCT_EXPORT_MODULE();
|
|
|
189
227
|
[StreamVideoReactNative didReceiveIncomingPushWithPayload:payload forType:type];
|
|
190
228
|
}
|
|
191
229
|
|
|
230
|
+
+(void)didReceiveIncomingVoIPPush:(PKPushPayload *)payload
|
|
231
|
+
metadata:(id _Nullable)metadata
|
|
232
|
+
completionHandler:(void (^_Nullable)(void))completion {
|
|
233
|
+
NSDictionary *streamPayload = payload.dictionaryPayload[@"stream"];
|
|
234
|
+
if (!streamPayload) {
|
|
235
|
+
#if DEBUG
|
|
236
|
+
NSLog(@"[StreamVideoReactNative][didReceiveIncomingVoIPPush] Stream payload not found");
|
|
237
|
+
#endif
|
|
238
|
+
if (completion) {
|
|
239
|
+
completion();
|
|
240
|
+
}
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
NSString *callCid = streamPayload[@"call_cid"];
|
|
245
|
+
if (!callCid) {
|
|
246
|
+
#if DEBUG
|
|
247
|
+
NSLog(@"[StreamVideoReactNative][didReceiveIncomingVoIPPush] Missing required field: call_cid");
|
|
248
|
+
#endif
|
|
249
|
+
if (completion) {
|
|
250
|
+
completion();
|
|
251
|
+
}
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
NSString *type = @"PKPushTypeVoIP";
|
|
256
|
+
BOOL mustReport = readMustReportFromMetadata(metadata);
|
|
257
|
+
|
|
258
|
+
// Both skip paths require mustReport == NO; skipping while YES risks
|
|
259
|
+
// PushKit terminating the app.
|
|
260
|
+
if (!mustReport && ![StreamVideoReactNative canRegisterCall]) {
|
|
261
|
+
// Busy reject: drop without forwarding to JS.
|
|
262
|
+
if (completion) {
|
|
263
|
+
completion();
|
|
264
|
+
}
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (!mustReport &&
|
|
269
|
+
[StreamVideoReactNative shouldSkipIncomingPushInForeground] &&
|
|
270
|
+
[StreamVideoReactNative isAppInForeground]) {
|
|
271
|
+
// Foreground skip: hide CallKit, let JS render the ringing UI.
|
|
272
|
+
[StreamVideoReactNative didReceiveIncomingPushWithPayload:payload forType:type];
|
|
273
|
+
if (completion) {
|
|
274
|
+
completion();
|
|
275
|
+
}
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
[StreamVideoReactNative reportNewIncomingCall:streamPayload forType:type completionHandler:completion];
|
|
280
|
+
[StreamVideoReactNative didReceiveIncomingPushWithPayload:payload forType:type];
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Reads `PKVoIPPushMetadata.mustReport` via runtime dispatch. Fail-safe:
|
|
284
|
+
// returns YES on any uncertainty (nil, missing property, wrong return type)
|
|
285
|
+
// so unknown metadata never causes CallKit to be skipped.
|
|
286
|
+
static BOOL readMustReportFromMetadata(id _Nullable metadata) {
|
|
287
|
+
SEL selector = @selector(mustReport);
|
|
288
|
+
if (!metadata || ![metadata respondsToSelector:selector]) {
|
|
289
|
+
return YES;
|
|
290
|
+
}
|
|
291
|
+
NSMethodSignature *signature = [metadata methodSignatureForSelector:selector];
|
|
292
|
+
if (!signature || signature.methodReturnLength != sizeof(BOOL)) {
|
|
293
|
+
return YES;
|
|
294
|
+
}
|
|
295
|
+
// BOOL encodes as "c" (legacy ABIs) or "B" (modern). Reject anything else
|
|
296
|
+
// so getReturnValue: never reads garbage from an object-returning selector.
|
|
297
|
+
const char *returnType = signature.methodReturnType;
|
|
298
|
+
if (!returnType ||
|
|
299
|
+
(strcmp(returnType, @encode(BOOL)) != 0 &&
|
|
300
|
+
strcmp(returnType, @encode(bool)) != 0)) {
|
|
301
|
+
return YES;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
|
|
305
|
+
[invocation setTarget:metadata];
|
|
306
|
+
[invocation setSelector:selector];
|
|
307
|
+
[invocation invoke];
|
|
308
|
+
|
|
309
|
+
BOOL mustReport = NO;
|
|
310
|
+
[invocation getReturnValue:&mustReport];
|
|
311
|
+
return mustReport;
|
|
312
|
+
}
|
|
313
|
+
|
|
192
314
|
+(void)reportNewIncomingCall:(NSDictionary *)streamPayload forType:(NSString *)type completionHandler: (void (^_Nullable)(void)) completion {
|
|
193
315
|
Class callingxClass = NSClassFromString(@"Callingx");
|
|
194
316
|
if (!callingxClass) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"description": "Stream Video SDK for React Native",
|
|
5
5
|
"author": "https://getstream.io",
|
|
6
6
|
"homepage": "https://getstream.io/video/docs/react-native/",
|
|
@@ -50,17 +50,15 @@
|
|
|
50
50
|
"!**/.*"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@stream-io/video-client": "1.
|
|
54
|
-
"@stream-io/video-react-bindings": "1.
|
|
53
|
+
"@stream-io/video-client": "1.50.0",
|
|
54
|
+
"@stream-io/video-react-bindings": "1.16.0",
|
|
55
55
|
"intl-pluralrules": "2.0.1",
|
|
56
56
|
"react-native-url-polyfill": "^3.0.0",
|
|
57
57
|
"rxjs": "~7.8.2",
|
|
58
58
|
"text-encoding-polyfill": "0.6.7"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@notifee/react-native": ">=9.0.0",
|
|
62
61
|
"@react-native-community/netinfo": ">=9.0.0",
|
|
63
|
-
"@react-native-community/push-notification-ios": ">=1.11.0",
|
|
64
62
|
"@react-native-firebase/app": ">=17.5.0",
|
|
65
63
|
"@react-native-firebase/messaging": ">=17.5.0",
|
|
66
64
|
"@stream-io/noise-cancellation-react-native": ">=0.1.0",
|
|
@@ -77,12 +75,6 @@
|
|
|
77
75
|
"react-native-svg": ">=13.6.0"
|
|
78
76
|
},
|
|
79
77
|
"peerDependenciesMeta": {
|
|
80
|
-
"@notifee/react-native": {
|
|
81
|
-
"optional": true
|
|
82
|
-
},
|
|
83
|
-
"@react-native-community/push-notification-ios": {
|
|
84
|
-
"optional": true
|
|
85
|
-
},
|
|
86
78
|
"@react-native-firebase/app": {
|
|
87
79
|
"optional": true
|
|
88
80
|
},
|
|
@@ -119,14 +111,12 @@
|
|
|
119
111
|
"@expo/config-plugins": "54.0.2",
|
|
120
112
|
"@expo/config-types": "^54.0.8",
|
|
121
113
|
"@expo/plist": "^0.4.7",
|
|
122
|
-
"@notifee/react-native": "9.1.8",
|
|
123
114
|
"@react-native-community/netinfo": "11.4.1",
|
|
124
|
-
"@react-native-community/push-notification-ios": "1.11.0",
|
|
125
115
|
"@react-native-firebase/app": "^23.4.0",
|
|
126
116
|
"@react-native-firebase/messaging": "^23.4.0",
|
|
127
117
|
"@react-native/babel-preset": "^0.81.5",
|
|
128
118
|
"@stream-io/noise-cancellation-react-native": "^0.7.0",
|
|
129
|
-
"@stream-io/react-native-callingx": "^0.
|
|
119
|
+
"@stream-io/react-native-callingx": "^0.3.0",
|
|
130
120
|
"@stream-io/react-native-webrtc": "137.2.0",
|
|
131
121
|
"@stream-io/video-filters-react-native": "^0.12.2",
|
|
132
122
|
"@testing-library/jest-native": "^5.4.3",
|
|
@@ -45,17 +45,29 @@ export const IncomingCall = ({
|
|
|
45
45
|
}: IncomingCallProps) => {
|
|
46
46
|
const { t } = useI18n();
|
|
47
47
|
const {
|
|
48
|
-
theme: { colors, incomingCall, typefaces },
|
|
48
|
+
theme: { colors, incomingCall, typefaces, variants },
|
|
49
49
|
} = useTheme();
|
|
50
50
|
|
|
51
51
|
const landscapeContentStyles: ViewStyle = {
|
|
52
52
|
flexDirection: landscape ? 'row' : 'column',
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
const insetStyles: ViewStyle = {
|
|
56
|
+
paddingTop: variants.insets.top,
|
|
57
|
+
paddingBottom: variants.insets.bottom,
|
|
58
|
+
paddingLeft: variants.insets.left,
|
|
59
|
+
paddingRight: variants.insets.right,
|
|
60
|
+
};
|
|
61
|
+
|
|
55
62
|
return (
|
|
56
63
|
<Background>
|
|
57
64
|
<View
|
|
58
|
-
style={[
|
|
65
|
+
style={[
|
|
66
|
+
styles.content,
|
|
67
|
+
landscapeContentStyles,
|
|
68
|
+
insetStyles,
|
|
69
|
+
incomingCall.content,
|
|
70
|
+
]}
|
|
59
71
|
>
|
|
60
72
|
<View style={[styles.topContainer, incomingCall.topContainer]}>
|
|
61
73
|
<UserInfo />
|
|
@@ -35,7 +35,7 @@ export const OutgoingCall = ({
|
|
|
35
35
|
landscape,
|
|
36
36
|
}: OutgoingCallProps) => {
|
|
37
37
|
const {
|
|
38
|
-
theme: { colors, typefaces, outgoingCall },
|
|
38
|
+
theme: { colors, typefaces, outgoingCall, variants },
|
|
39
39
|
} = useTheme();
|
|
40
40
|
const { t } = useI18n();
|
|
41
41
|
|
|
@@ -43,6 +43,13 @@ export const OutgoingCall = ({
|
|
|
43
43
|
flexDirection: landscape ? 'row' : 'column',
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
const insetStyles: ViewStyle = {
|
|
47
|
+
paddingTop: variants.insets.top,
|
|
48
|
+
paddingBottom: variants.insets.bottom,
|
|
49
|
+
paddingLeft: variants.insets.left,
|
|
50
|
+
paddingRight: variants.insets.right,
|
|
51
|
+
};
|
|
52
|
+
|
|
46
53
|
return (
|
|
47
54
|
<>
|
|
48
55
|
<View
|
|
@@ -53,7 +60,12 @@ export const OutgoingCall = ({
|
|
|
53
60
|
]}
|
|
54
61
|
>
|
|
55
62
|
<View
|
|
56
|
-
style={[
|
|
63
|
+
style={[
|
|
64
|
+
styles.content,
|
|
65
|
+
landscapeContentStyles,
|
|
66
|
+
insetStyles,
|
|
67
|
+
outgoingCall.content,
|
|
68
|
+
]}
|
|
57
69
|
>
|
|
58
70
|
<View style={[styles.topContainer, outgoingCall.topContainer]}>
|
|
59
71
|
<UserInfo />
|
|
@@ -68,13 +68,11 @@ const RingingCallPanel = ({
|
|
|
68
68
|
CallPreparingIndicator = DefaultCallPreparingIndicator,
|
|
69
69
|
landscape,
|
|
70
70
|
onBackPress,
|
|
71
|
-
|
|
71
|
+
callingState,
|
|
72
|
+
}: RingingCallContentProps & { callingState: CallingState }) => {
|
|
72
73
|
const call = useCall();
|
|
73
74
|
const isCallCreatedByMe = call?.isCreatedByMe;
|
|
74
75
|
|
|
75
|
-
const { useCallCallingState } = useCallStateHooks();
|
|
76
|
-
const callingState = useCallCallingState();
|
|
77
|
-
|
|
78
76
|
switch (callingState) {
|
|
79
77
|
case CallingState.RINGING:
|
|
80
78
|
return isCallCreatedByMe
|
|
@@ -102,15 +100,12 @@ export const RingingCallContent = (props: RingingCallContentProps) => {
|
|
|
102
100
|
const {
|
|
103
101
|
theme: { ringingCallContent },
|
|
104
102
|
} = useTheme();
|
|
103
|
+
const { useCallCallingState } = useCallStateHooks();
|
|
104
|
+
const callingState = useCallCallingState();
|
|
105
|
+
|
|
105
106
|
return (
|
|
106
|
-
<View style={[
|
|
107
|
-
<RingingCallPanel {...props} />
|
|
107
|
+
<View style={[StyleSheet.absoluteFill, ringingCallContent.container]}>
|
|
108
|
+
<RingingCallPanel {...props} callingState={callingState} />
|
|
108
109
|
</View>
|
|
109
110
|
);
|
|
110
111
|
};
|
|
111
|
-
|
|
112
|
-
const styles = StyleSheet.create({
|
|
113
|
-
container: {
|
|
114
|
-
...StyleSheet.absoluteFillObject,
|
|
115
|
-
},
|
|
116
|
-
});
|
|
@@ -13,12 +13,23 @@ export const TextBasedIndicator = (props: TextBasedIndicatorProps) => {
|
|
|
13
13
|
theme: {
|
|
14
14
|
colors,
|
|
15
15
|
typefaces,
|
|
16
|
-
variants: { iconSizes },
|
|
16
|
+
variants: { iconSizes, insets },
|
|
17
17
|
},
|
|
18
18
|
} = useTheme();
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<View
|
|
21
|
+
<View
|
|
22
|
+
style={[
|
|
23
|
+
styles.container,
|
|
24
|
+
{
|
|
25
|
+
backgroundColor: colors.sheetTertiary,
|
|
26
|
+
paddingTop: insets.top,
|
|
27
|
+
paddingBottom: insets.bottom,
|
|
28
|
+
paddingLeft: insets.left,
|
|
29
|
+
paddingRight: insets.right,
|
|
30
|
+
},
|
|
31
|
+
]}
|
|
32
|
+
>
|
|
22
33
|
{props.onBackPress && (
|
|
23
34
|
<View style={styles.backContainer}>
|
|
24
35
|
<Pressable
|