@stream-io/video-react-native-sdk 1.2.16 → 1.3.1
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 +1609 -0
- package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js +2 -1
- package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js +4 -3
- package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/RejectCallButton.js +7 -4
- package/dist/commonjs/components/Call/CallControls/RejectCallButton.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js +43 -6
- package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +1 -1
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +2 -2
- package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +2 -7
- package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +1 -1
- package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js +3 -3
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +1 -0
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/providers/StreamCall.js +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +5 -6
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/index.js +12 -0
- package/dist/commonjs/utils/index.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +23 -79
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/index.js +39 -0
- package/dist/commonjs/utils/push/index.js.map +1 -0
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -0
- package/dist/commonjs/utils/push/internal/utils.js +158 -0
- package/dist/commonjs/utils/push/internal/utils.js.map +1 -0
- package/dist/commonjs/utils/push/ios.js +43 -84
- package/dist/commonjs/utils/push/ios.js.map +1 -1
- package/dist/commonjs/utils/push/libs/expoNotifications.js.map +1 -1
- package/dist/commonjs/utils/push/libs/index.js +0 -11
- package/dist/commonjs/utils/push/libs/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +1 -1
- package/dist/commonjs/utils/push/utils.js +29 -150
- package/dist/commonjs/utils/push/utils.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/commonjs/version.js.map +1 -1
- package/dist/module/components/Call/CallControls/IncomingCallControls.js +2 -1
- package/dist/module/components/Call/CallControls/IncomingCallControls.js.map +1 -1
- package/dist/module/components/Call/CallControls/OutgoingCallControls.js +4 -3
- package/dist/module/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
- package/dist/module/components/Call/CallControls/RejectCallButton.js +7 -4
- package/dist/module/components/Call/CallControls/RejectCallButton.js.map +1 -1
- package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js +41 -4
- package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +1 -1
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +2 -2
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/push/useProcessPushCallEffect.js +2 -7
- package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -1
- package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js +3 -3
- package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js.map +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +1 -0
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/providers/StreamCall.js +1 -1
- package/dist/module/providers/StreamCall.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +5 -6
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/index.js +1 -0
- package/dist/module/utils/index.js.map +1 -1
- package/dist/module/utils/push/android.js +20 -79
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/index.js +4 -0
- package/dist/module/utils/push/index.js.map +1 -0
- package/dist/module/utils/push/internal/rxSubjects.js.map +1 -0
- package/dist/module/utils/push/internal/utils.js +147 -0
- package/dist/module/utils/push/internal/utils.js.map +1 -0
- package/dist/module/utils/push/ios.js +40 -81
- package/dist/module/utils/push/ios.js.map +1 -1
- package/dist/module/utils/push/libs/expoNotifications.js.map +1 -1
- package/dist/module/utils/push/libs/index.js +0 -1
- package/dist/module/utils/push/libs/index.js.map +1 -1
- package/dist/module/utils/push/libs/iosPushNotification.js.map +1 -1
- package/dist/module/utils/push/utils.js +25 -144
- package/dist/module/utils/push/utils.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/version.js.map +1 -1
- package/dist/typescript/components/Call/CallControls/IncomingCallControls.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/OutgoingCallControls.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts +17 -2
- package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useIosCallKeepEventsSetupEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +6 -4
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/index.d.ts +1 -0
- package/dist/typescript/utils/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts +12 -2
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/index.d.ts +4 -0
- package/dist/typescript/utils/push/index.d.ts.map +1 -0
- package/dist/typescript/utils/push/{rxSubjects.d.ts → internal/rxSubjects.d.ts} +1 -1
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -0
- package/dist/typescript/utils/push/internal/utils.d.ts +43 -0
- package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -0
- package/dist/typescript/utils/push/ios.d.ts +8 -3
- package/dist/typescript/utils/push/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/expoNotifications.d.ts +2 -0
- package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/index.d.ts +0 -1
- package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/iosPushNotification.d.ts +2 -0
- package/dist/typescript/utils/push/libs/iosPushNotification.d.ts.map +1 -1
- package/dist/typescript/utils/push/utils.d.ts +14 -42
- package/dist/typescript/utils/push/utils.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/dist/typescript/version.d.ts.map +1 -1
- package/package.json +6 -11
- package/src/components/Call/CallControls/IncomingCallControls.tsx +4 -1
- package/src/components/Call/CallControls/OutgoingCallControls.tsx +3 -2
- package/src/components/Call/CallControls/RejectCallButton.tsx +19 -3
- package/src/hooks/push/useIosCallKeepEventsSetupEffect.ts +62 -6
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +1 -1
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +2 -2
- package/src/hooks/push/useProcessPushCallEffect.ts +2 -7
- package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +3 -3
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +1 -0
- package/src/providers/StreamCall.tsx +1 -1
- package/src/utils/StreamVideoRN/index.ts +11 -6
- package/src/utils/StreamVideoRN/types.ts +6 -4
- package/src/utils/index.ts +1 -0
- package/src/utils/push/android.ts +28 -99
- package/src/utils/push/index.ts +3 -0
- package/src/utils/push/{rxSubjects.ts → internal/rxSubjects.ts} +1 -1
- package/src/utils/push/internal/utils.ts +178 -0
- package/src/utils/push/ios.ts +49 -115
- package/src/utils/push/libs/expoNotifications.ts +4 -0
- package/src/utils/push/libs/index.ts +0 -1
- package/src/utils/push/libs/iosPushNotification.ts +4 -0
- package/src/utils/push/utils.ts +44 -175
- package/src/version.ts +1 -1
- package/dist/commonjs/utils/push/libs/expoTaskManager.js +0 -17
- package/dist/commonjs/utils/push/libs/expoTaskManager.js.map +0 -1
- package/dist/commonjs/utils/push/rxSubjects.js.map +0 -1
- package/dist/module/utils/push/libs/expoTaskManager.js +0 -11
- package/dist/module/utils/push/libs/expoTaskManager.js.map +0 -1
- package/dist/module/utils/push/rxSubjects.js.map +0 -1
- package/dist/typescript/utils/push/libs/expoTaskManager.d.ts +0 -3
- package/dist/typescript/utils/push/libs/expoTaskManager.d.ts.map +0 -1
- package/dist/typescript/utils/push/rxSubjects.d.ts.map +0 -1
- package/ios/StreamVideoReactNative.xcodeproj/project.xcworkspace/xcuserdata/santhoshvaiyapuri.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/StreamVideoReactNative.xcodeproj/xcuserdata/santhoshvaiyapuri.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/src/utils/push/libs/expoTaskManager.ts +0 -16
- /package/dist/commonjs/utils/push/{rxSubjects.js → internal/rxSubjects.js} +0 -0
- /package/dist/module/utils/push/{rxSubjects.js → internal/rxSubjects.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","
|
|
1
|
+
{"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getPushNotificationIosLib","getLogger","setPushLogoutCallback","EventType","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","next","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","request","trigger","payload","stream","oniOSNotifeeEvent","OS","detail","PRESS","notification","data","result","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","logger","push_provider_name","addDevice","isExpo","expoNotificationsLib","getDevicePushTokenAsync","then","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAEEC,uBAAuB,EACvBC,yBAAyB,QAEpB,QAAQ;AACf,SAA4BC,SAAS,QAAQ,yBAAyB;AACtE,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,SAAS,QAAe,uBAAuB;AACxD,SAASC,aAAa,QAAQ,kBAAkB;AAKhD,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/Bb,uBAAuB,CAACgB,IAAI,CAAC;MAAEF,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;AACF;AAEA,OAAO,MAAMI,0BAA0B,GAAIC,KAAuB,IAAK;EACrE,MAAMC,UAAU,GAAGb,aAAa,CAACc,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IAAIF,UAAU,EAAE;IACd,IAAID,KAAK,CAACI,OAAO,CAACC,OAAO,CAACV,IAAI,KAAK,MAAM,EAAE;MACzC,MAAMF,aAAa,GAAGO,KAAK,CAACI,O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ACqC,MAAM,EAAE;IACrB,MAAMC,oBAAoB,GAAGxD,uBAAuB,CAAC,CAAC;IACtDwD,oBAAoB,CAACC,uBAAuB,CAAC,CAAC,CAACC,IAAI,CAAEC,eAAe,IAAK;MACvEb,cAAc,CAACa,eAAe,CAAC7B,IAAI,CAAC;IACtC,CAAC,CAAC;IACF,MAAM8B,YAAY,GAAGJ,oBAAoB,CAACK,oBAAoB,CAC3DF,eAAe,IAAK;MACnBb,cAAc,CAACa,eAAe,CAAC7B,IAAI,CAAC;IACtC,CACF,CAAC;IACDa,sBAAsB,CAAC,MAAM;MAC3BiB,YAAY,CAACE,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ,CAAC,MAAM;IACL,MAAM5B,sBAAsB,GAAGjC,yBAAyB,CAAC,CAAC;IAC1DiC,sBAAsB,CAAC6B,gBAAgB,CAAC,UAAU,EAAGxD,KAAK,IAAK;MAC7DuC,cAAc,CAACvC,KAAK,CAAC;IACvB,CAAC,CAAC;IACFoC,sBAAsB,CAAC,MAAM;MAC3BT,sBAAsB,CAAC8B,mBAAmB,CAAC,UAAU,CAAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["expoNotificationsLib","require","_e","getExpoNotificationsLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["expoNotificationsLib","require","_e","getExpoNotificationsLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":"AAMA,IAAIA,oBAAsD;AAE1D,IAAI;EACFA,oBAAoB,GAAGC,OAAO,CAAC,oBAAoB,CAAC;AACtD,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACH,oBAAoB,EAAE;IACzB,MAAMI,KAAK,CACT,gJACF,CAAC;EACH;EACA,OAAOJ,oBAAoB;AAC7B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,WAAW;;AAEzB;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pushNotificationIosLib","require","default","_e","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":"AAGA,IAAIA,sBAA0D;
|
|
1
|
+
{"version":3,"names":["pushNotificationIosLib","require","default","_e","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":"AAGA,IAAIA,sBAA0D;AAM9D,IAAI;EACFA,sBAAsB,GACpBC,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AACpE,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,IAAI,CAACJ,sBAAsB,EAAE;IAC3B,MAAMK,KAAK,CACT,0NACF,CAAC;EACH;EACA,OAAOL,sBAAsB;AAC/B","ignoreList":[]}
|
|
@@ -1,146 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
let mustEndCall = false;
|
|
21
|
-
let callkeepReason = 0;
|
|
22
|
-
if (created_by_id && rejected_by) {
|
|
23
|
-
if (rejected_by[created_by_id]) {
|
|
24
|
-
// call was cancelled by the caller
|
|
25
|
-
mustEndCall = true;
|
|
26
|
-
callkeepReason = 2;
|
|
27
|
-
}
|
|
28
|
-
} else if (receiver_id && rejected_by) {
|
|
29
|
-
if (rejected_by[receiver_id]) {
|
|
30
|
-
// call was rejected by the receiver in some other device
|
|
31
|
-
mustEndCall = true;
|
|
32
|
-
callkeepReason = 5;
|
|
33
|
-
}
|
|
34
|
-
} else if (receiver_id && accepted_by) {
|
|
35
|
-
if (accepted_by[receiver_id]) {
|
|
36
|
-
// call was accepted by the receiver in some other device
|
|
37
|
-
mustEndCall = true;
|
|
38
|
-
callkeepReason = 4;
|
|
39
|
-
}
|
|
1
|
+
export function isFirebaseStreamVideoMessage(message) {
|
|
2
|
+
return message.data?.sender === 'stream.video';
|
|
3
|
+
}
|
|
4
|
+
export function isNotifeeStreamVideoEvent(event) {
|
|
5
|
+
const {
|
|
6
|
+
detail
|
|
7
|
+
} = event;
|
|
8
|
+
const {
|
|
9
|
+
notification
|
|
10
|
+
} = detail;
|
|
11
|
+
return notification?.data?.sender === 'stream.video';
|
|
12
|
+
}
|
|
13
|
+
export function isExpoNotificationStreamVideoEvent(event) {
|
|
14
|
+
if (event.request.trigger.type === 'push') {
|
|
15
|
+
// iOS
|
|
16
|
+
const streamPayload = event.request.trigger.payload?.stream;
|
|
17
|
+
// Android
|
|
18
|
+
const remoteMessageData = event.request.trigger.remoteMessage?.data;
|
|
19
|
+
return streamPayload?.sender === 'stream.video' || remoteMessageData?.sender === 'stream.video';
|
|
40
20
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/* An action for the notification or callkeep and app does not have JS context setup yet, so we need to do two steps:
|
|
48
|
-
1. we need to create a new client and connect the user to decline the call
|
|
49
|
-
2. this is because the app is in background state and we don't have a client to get the call and do an action
|
|
50
|
-
*/
|
|
51
|
-
export const processCallFromPushInBackground = async (pushConfig, call_cid, action) => {
|
|
52
|
-
let videoClient;
|
|
53
|
-
try {
|
|
54
|
-
videoClient = await pushConfig.createStreamVideoClient();
|
|
55
|
-
if (!videoClient) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
} catch (e) {
|
|
59
|
-
const logger = getLogger(['processCallFromPushInBackground']);
|
|
60
|
-
logger('error', 'failed to create video client', e);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
await processCallFromPush(videoClient, call_cid, action, pushConfig);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* This function is used process the call from push notifications due to incoming call
|
|
68
|
-
* It does the following steps:
|
|
69
|
-
* 1. Get the call from the client if present or create a new call
|
|
70
|
-
* 2. Fetch the latest state of the call from the server if its not already in ringing state
|
|
71
|
-
* 3. Join or leave the call based on the user's action.
|
|
72
|
-
*/
|
|
73
|
-
export const processCallFromPush = async (client, call_cid, action, pushConfig) => {
|
|
74
|
-
let callFromPush;
|
|
75
|
-
try {
|
|
76
|
-
callFromPush = await client.onRingingCall(call_cid);
|
|
77
|
-
} catch (e) {
|
|
78
|
-
const logger = getLogger(['processCallFromPush']);
|
|
79
|
-
logger('error', 'failed to fetch call from push notification', e);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
// note: when action was pressed or delivered, we dont need to do anything as the only thing is to do is to get the call which adds it to the client
|
|
83
|
-
try {
|
|
84
|
-
if (action === 'accept') {
|
|
85
|
-
if (pushConfig.publishOptions) {
|
|
86
|
-
callFromPush.updatePublishOptions(pushConfig.publishOptions);
|
|
87
|
-
}
|
|
88
|
-
await callFromPush.join();
|
|
89
|
-
} else if (action === 'decline') {
|
|
90
|
-
await callFromPush.leave({
|
|
91
|
-
reject: true
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
} catch (e) {
|
|
95
|
-
const logger = getLogger(['processCallFromPush']);
|
|
96
|
-
logger('error', `failed to process ${action} call from push notification`, e);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* This function is used process the call from push notifications due to non ringing calls
|
|
102
|
-
* It does the following steps:
|
|
103
|
-
* 1. Get the call from the client if present or create a new call
|
|
104
|
-
* 2. Fetch the latest state of the call from the server if its not already in ringing state
|
|
105
|
-
* 3. Call all the callbacks to inform the app about the call
|
|
106
|
-
*/
|
|
107
|
-
export const processNonIncomingCallFromPush = async (client, call_cid, nonRingingNotificationType) => {
|
|
108
|
-
let callFromPush;
|
|
109
|
-
try {
|
|
110
|
-
const _callFromPush = client.state.calls.find(c => c.cid === call_cid);
|
|
111
|
-
if (_callFromPush) {
|
|
112
|
-
callFromPush = _callFromPush;
|
|
113
|
-
} else {
|
|
114
|
-
// if not it means that WS is not alive when receiving the push notifications and we need to fetch the call
|
|
115
|
-
const [callType, callId] = call_cid.split(':');
|
|
116
|
-
callFromPush = client.call(callType, callId);
|
|
117
|
-
await callFromPush.get();
|
|
118
|
-
}
|
|
119
|
-
} catch (e) {
|
|
120
|
-
const logger = getLogger(['processNonIncomingCallFromPush']);
|
|
121
|
-
logger('error', 'failed to fetch call from push notification', e);
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
onNewCallNotification(callFromPush, nonRingingNotificationType);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* This function is used to clear all the push related WS subscriptions
|
|
129
|
-
* note: events are subscribed in push for accept/decline through WS
|
|
130
|
-
*/
|
|
131
|
-
export const clearPushWSEventSubscriptions = () => {
|
|
132
|
-
const unsubscriptionCallbacks = RxUtils.getCurrentValue(pushUnsubscriptionCallbacks$);
|
|
133
|
-
if (unsubscriptionCallbacks) {
|
|
134
|
-
unsubscriptionCallbacks.forEach(cb => cb());
|
|
135
|
-
}
|
|
136
|
-
pushUnsubscriptionCallbacks$.next(undefined);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* This ref is used to check if the push WS subscriptions can be added
|
|
141
|
-
* It is used to avoid adding the push WS subscriptions when the client is connected to WS in the foreground
|
|
142
|
-
*/
|
|
143
|
-
export const canAddPushWSSubscriptionsRef = {
|
|
144
|
-
current: true
|
|
145
|
-
};
|
|
21
|
+
}
|
|
22
|
+
export function isPushNotificationiOSStreamVideoEvent(notification) {
|
|
23
|
+
const data = notification.getData();
|
|
24
|
+
const streamPayload = data?.stream;
|
|
25
|
+
return streamPayload?.sender === 'stream.video';
|
|
26
|
+
}
|
|
146
27
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["isFirebaseStreamVideoMessage","message","data","sender","isNotifeeStreamVideoEvent","event","detail","notification","isExpoNotificationStreamVideoEvent","request","trigger","type","streamPayload","payload","stream","remoteMessageData","remoteMessage","isPushNotificationiOSStreamVideoEvent","getData"],"sourceRoot":"../../../../src","sources":["utils/push/utils.ts"],"mappings":"AAcA,OAAO,SAASA,4BAA4BA,CAC1CC,OAA6C,EAC7C;EACA,OAAOA,OAAO,CAACC,IAAI,EAAEC,MAAM,KAAK,cAAc;AAChD;AAEA,OAAO,SAASC,yBAAyBA,CAACC,KAAY,EAAE;EACtD,MAAM;IAAEC;EAAO,CAAC,GAAGD,KAAK;EACxB,MAAM;IAAEE;EAAa,CAAC,GAAGD,MAAM;EAC/B,OAAOC,YAAY,EAAEL,IAAI,EAAEC,MAAM,KAAK,cAAc;AACtD;AAEA,OAAO,SAASK,kCAAkCA,CAACH,KAAuB,EAAE;EAC1E,IAAIA,KAAK,CAACI,OAAO,CAACC,OAAO,CAACC,IAAI,KAAK,MAAM,EAAE;IACzC;IACA,MAAMC,aAAa,GAAGP,KAAK,CAACI,OAAO,CAACC,OAAO,CAACG,OAAO,EAC/CC,MAA2B;IAC/B;IACA,MAAMC,iBAAiB,GAAGV,KAAK,CAACI,OAAO,CAACC,OAAO,CAACM,aAAa,EAAEd,IAAI;IACnE,OACEU,aAAa,EAAET,MAAM,KAAK,cAAc,IACxCY,iBAAiB,EAAEZ,MAAM,KAAK,cAAc;EAEhD;AACF;AAEA,OAAO,SAASc,qCAAqCA,CACnDV,YAAqC,EACrC;EACA,MAAML,IAAI,GAAGK,YAAY,CAACW,OAAO,CAAC,CAAC;EACnC,MAAMN,aAAa,GAAGV,IAAI,EAAEY,MAA2B;EACvD,OAAOF,aAAa,EAAET,MAAM,KAAK,cAAc;AACjD","ignoreList":[]}
|
package/dist/module/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '1.
|
|
1
|
+
export const version = '1.3.1';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncomingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/IncomingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,kDAG9B,yBAAyB,
|
|
1
|
+
{"version":3,"file":"IncomingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/IncomingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,kDAG9B,yBAAyB,sBAc3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutgoingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/OutgoingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,6BAE9B,yBAAyB,
|
|
1
|
+
{"version":3,"file":"OutgoingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/OutgoingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,6BAE9B,yBAAyB,sBAsB3B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
2
3
|
/**
|
|
3
4
|
* The props for the Reject Call button.
|
|
4
5
|
*/
|
|
@@ -14,12 +15,26 @@ type RejectCallButtonProps = {
|
|
|
14
15
|
* Note: If the `onPressHandler` is passed this handler will not be executed.
|
|
15
16
|
*/
|
|
16
17
|
onRejectCallHandler?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the height, width and border-radius (half the value) of the button.
|
|
20
|
+
*/
|
|
21
|
+
size?: React.ComponentProps<typeof CallControlsButton>['size'];
|
|
22
|
+
/**
|
|
23
|
+
* Optional: Reason for rejecting the call.
|
|
24
|
+
* Pass a predefined or a custom reason.
|
|
25
|
+
* There are four predefined reasons for rejecting the call:
|
|
26
|
+
- `busy` - when the callee is busy and cannot accept the call.
|
|
27
|
+
- `decline` - when the callee intentionally declines the call.
|
|
28
|
+
- `cancel` - when the caller cancels the call.
|
|
29
|
+
- `timeout` - when the **caller** or **callee** rejects the call after `auto_cancel_timeout_ms` or `incoming_call_timeout_ms` accordingly.
|
|
30
|
+
*/
|
|
31
|
+
rejectReason?: string;
|
|
17
32
|
};
|
|
18
33
|
/**
|
|
19
34
|
* Button to reject a call.
|
|
20
35
|
*
|
|
21
|
-
*
|
|
36
|
+
* Calls call.leave({ reject: true, reason: `OPTIONAL-REASON` }) internally.
|
|
22
37
|
*/
|
|
23
|
-
export declare const RejectCallButton: ({ onPressHandler, onRejectCallHandler, }: RejectCallButtonProps) => React.JSX.Element;
|
|
38
|
+
export declare const RejectCallButton: ({ onPressHandler, onRejectCallHandler, size, rejectReason, }: RejectCallButtonProps) => React.JSX.Element;
|
|
24
39
|
export {};
|
|
25
40
|
//# sourceMappingURL=RejectCallButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RejectCallButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/RejectCallButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RejectCallButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/RejectCallButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D;;GAEG;AACH,KAAK,qBAAqB,GAAG;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/D;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,iEAK1B,qBAAqB,sBA0CvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIosCallKeepEventsSetupEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallKeepEventsSetupEffect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIosCallKeepEventsSetupEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallKeepEventsSetupEffect.ts"],"names":[],"mappings":"AAqBA;;GAEG;AACH,eAAO,MAAM,+BAA+B,YA8C3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AA2DA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,YAgFzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAiC,EAC/B,2BAA2B,EAC5B,MAAM,sCAAsC,CAAC;AAa9C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,MAAM,CAA+B;IAEpD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAO1E,MAAM,CAAC,gCAAgC,CACrC,aAAa,EAAE,OAAO,CACpB,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CACzE;IAWH;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAmBvE,MAAM,CAAC,SAAS;IAIhB;;;OAGG;IACH,MAAM,CAAC,YAAY;IASnB;;;;OAIG;IACH,MAAM,CAAC,gCAAgC,CACrC,QAAQ,EAAE,2BAA2B;CAYxC"}
|
|
@@ -102,10 +102,12 @@ export type StreamVideoConfig = {
|
|
|
102
102
|
* }
|
|
103
103
|
*/
|
|
104
104
|
createStreamVideoClient: () => Promise<StreamVideoClient | undefined>;
|
|
105
|
-
/**
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
/** @deprecated This method will be removed in the future. Please watch for incoming and outgoing calls in the root component of your app.
|
|
106
|
+
Please see https://getstream.io/video/docs/react-native/advanced/ringing-calls/#watch-for-incoming-and-outgoing-calls for more information */
|
|
107
|
+
navigateAcceptCall?: () => void;
|
|
108
|
+
/** @deprecated This method will be removed in the future. Please watch for incoming and outgoing calls in the root component of your app.
|
|
109
|
+
Please see https://getstream.io/video/docs/react-native/advanced/ringing-calls/#watch-for-incoming-and-outgoing-calls for more information */
|
|
110
|
+
navigateToIncomingCall?: () => void;
|
|
109
111
|
/** Callback that is called when a non ringing push notification was tapped */
|
|
110
112
|
onTapNonRingingCallNotification?: (call_cid: string, type: NonRingingPushEvent) => void;
|
|
111
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAE5E,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;;WAIG;QACH,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,GAAG,EAAE;YACH;;;;eAIG;YACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;SAC3B,CAAC;QACF,OAAO,EAAE;YACP;;;;eAIG;YACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAC1B;;;;;;;;;eASG;YACH,WAAW,CAAC,EAAE,cAAc,CAAC;YAC7B;;;;;;;;;eASG;YACH,mBAAmB,CAAC,EAAE,cAAc,CAAC;YACrC;;;;;;;eAOG;YACH,mCAAmC,CAAC,EAAE;gBACpC,QAAQ,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,MAAM,CAAC;gBAC9C,OAAO,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,MAAM,CAAC;aAC9C,CAAC;YACF;;;;;;;;;;;;;eAaG;YACH,2BAA2B,CAAC,EAAE;gBAC5B,QAAQ,EAAE,CACR,IAAI,EAAE,mBAAmB,EACzB,eAAe,EAAE,MAAM,KACpB,MAAM,CAAC;gBACZ,OAAO,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,KAAK,MAAM,CAAC;aACzE,CAAC;SACH,CAAC;QACF;;;;;;;;;;;;;;;;;WAiBG;QACH,uBAAuB,EAAE,MAA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EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;QACtE;yJACiJ;QACjJ,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;QAChC;yJACiJ;QACjJ,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;QACpC,8EAA8E;QAC9E,+BAA+B,CAAC,EAAE,CAChC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,mBAAmB,KACtB,IAAI,CAAC;KACX,CAAC;IACF,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP;;;;eAIG;YACH,iBAAiB,EAAE;gBACjB,KAAK,EAAE,MAAM,CAAC;gBACd,IAAI,EAAE,MAAM,CAAC;aACd,CAAC;SACH,CAAC;KACH,CAAC;CACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const generateCallTitle: (memberUserIds: string[], totalMembersToShow?: number) => string;
|
|
2
2
|
export declare const generateParticipantTitle: (memberUserId: string) => string;
|
|
3
3
|
export declare const getInitialsOfName: (name: string) => string;
|
|
4
|
+
export * from './push/index';
|
|
4
5
|
export * from './enterPiPAndroid';
|
|
5
6
|
export * from './StreamVideoRN';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,uBACF,MAAM,WAgB5B,CAAC;AAGF,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,WAI5D,CAAC;AAGF,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAS7C,CAAC;AAEF,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,uBACF,MAAM,WAgB5B,CAAC;AAGF,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,WAI5D,CAAC;AAGF,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAS7C,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { StreamVideoClient } from '@stream-io/video-client';
|
|
2
2
|
import type { StreamVideoConfig } from '../StreamVideoRN/types';
|
|
3
|
+
import { NotifeeLib, FirebaseMessagingTypes } from './libs';
|
|
3
4
|
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
type onBackgroundEventFunctionParams = Parameters<NotifeeLib['default']['onBackgroundEvent']>[0];
|
|
6
|
+
type Event = Parameters<onBackgroundEventFunctionParams>[0];
|
|
6
7
|
/** Send token to stream, create notification channel, */
|
|
7
8
|
export declare function initAndroidPushToken(client: StreamVideoClient, pushConfig: PushConfig, setUnsubscribeListener: (unsubscribe: () => void) => void): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Creates notification from the push message data.
|
|
11
|
+
* For Ringing and Non-Ringing calls.
|
|
12
|
+
*/
|
|
13
|
+
export declare const firebaseDataHandler: (data: FirebaseMessagingTypes.RemoteMessage["data"]) => Promise<void>;
|
|
14
|
+
export declare const onAndroidNotifeeEvent: ({ event, isBackground, }: {
|
|
15
|
+
event: Event;
|
|
16
|
+
isBackground: boolean;
|
|
17
|
+
}) => Promise<void>;
|
|
8
18
|
export {};
|
|
9
19
|
//# sourceMappingURL=android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,UAAU,EACV,sBAAsB,EACvB,MAAM,QAAQ,CAAC;AAsBhB,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAEzD,KAAK,+BAA+B,GAAG,UAAU,CAC/C,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAC3C,CAAC,CAAC,CAAC,CAAC;AAEL,KAAK,KAAK,GAAG,UAAU,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC;AAI5D,0DAA0D;AAC1D,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBA+C1D;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,SACxB,sBAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,kBA+LnD,CAAC;AAEF,eAAO,MAAM,qBAAqB,6BAG/B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,kBA2EA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { NonRingingPushEvent } from '
|
|
2
|
+
import { NonRingingPushEvent } from '../../StreamVideoRN/types';
|
|
3
3
|
/**
|
|
4
4
|
* This rxjs subject is used to store the call cid of the accepted incoming call from push notification
|
|
5
5
|
* Note: it is should be subscribed only when a user has connected to the websocket of Stream
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rxSubjects.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/rxSubjects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;SAC3B,MAAM;UAAQ,mBAAmB;cAC9B,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,4BAA4B,qCAE7B,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,0BAA0B,qCAE3B,CAAC;AAEb;;;;GAIG;AACH,eAAO,MAAM,8CAA8C,qCACP,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,qCAE7B,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,4BAA4B,qCAE7B,CAAC;AAEb,sFAAsF;AACtF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAOF,eAAO,MAAM,gCAAgC,0CAEjC,CAAC;AAKb,eAAO,MAAM,0CAA0C,0CAE3C,CAAC;AAEb,KAAK,mBAAmB,GAAG,MAAM,IAAI,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,4BAA4B,oDAE7B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Call, StreamVideoClient } from '@stream-io/video-client';
|
|
2
|
+
import type { NonRingingPushEvent, StreamVideoConfig } from '../../StreamVideoRN/types';
|
|
3
|
+
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
4
|
+
type CanAddPushWSSubscriptionsRef = {
|
|
5
|
+
current: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* This function is used to check if the call should be ended based on the push notification
|
|
9
|
+
* Useful for callkeep management to end the call if necessary (with reportEndCallWithUUID)
|
|
10
|
+
*/
|
|
11
|
+
export declare const shouldCallBeEnded: (callFromPush: Call, created_by_id: string | undefined, receiver_id: string | undefined) => {
|
|
12
|
+
mustEndCall: boolean;
|
|
13
|
+
callkeepReason: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const processCallFromPushInBackground: (pushConfig: PushConfig, call_cid: string, action: Parameters<typeof processCallFromPush>[2]) => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* This function is used process the call from push notifications due to incoming call
|
|
18
|
+
* It does the following steps:
|
|
19
|
+
* 1. Get the call from the client if present or create a new call
|
|
20
|
+
* 2. Fetch the latest state of the call from the server if its not already in ringing state
|
|
21
|
+
* 3. Join or leave the call based on the user's action.
|
|
22
|
+
*/
|
|
23
|
+
export declare const processCallFromPush: (client: StreamVideoClient, call_cid: string, action: "accept" | "decline" | "pressed" | "backgroundDelivered", pushConfig: PushConfig) => Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* This function is used process the call from push notifications due to non ringing calls
|
|
26
|
+
* It does the following steps:
|
|
27
|
+
* 1. Get the call from the client if present or create a new call
|
|
28
|
+
* 2. Fetch the latest state of the call from the server
|
|
29
|
+
* 3. Call all the callbacks to inform the app about the call
|
|
30
|
+
*/
|
|
31
|
+
export declare const processNonIncomingCallFromPush: (client: StreamVideoClient, call_cid: string, nonRingingNotificationType: NonRingingPushEvent) => Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* This function is used to clear all the push related WS subscriptions
|
|
34
|
+
* note: events are subscribed in push for accept/decline through WS
|
|
35
|
+
*/
|
|
36
|
+
export declare const clearPushWSEventSubscriptions: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* This ref is used to check if the push WS subscriptions can be added
|
|
39
|
+
* It is used to avoid adding the push WS subscriptions when the client is connected to WS in the foreground
|
|
40
|
+
*/
|
|
41
|
+
export declare const canAddPushWSSubscriptionsRef: CanAddPushWSSubscriptionsRef;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAInC,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAEzD,KAAK,4BAA4B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,iBACd,IAAI,iBACH,MAAM,GAAG,SAAS,eACpB,MAAM,GAAG,SAAS;;;CAmChC,CAAC;AAMF,eAAO,MAAM,+BAA+B,eAC9B,UAAU,YACZ,MAAM,UACR,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,kBAelD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,WACtB,iBAAiB,YACf,MAAM,UACR,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,qBAAqB,cACpD,UAAU,kBA4BvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,WACjC,iBAAiB,YACf,MAAM,8BACY,mBAAmB,kBAmBhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,YAQzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,4BAE1C,CAAC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { StreamVideoConfig } from '../StreamVideoRN/types';
|
|
2
|
+
import { ExpoNotification, PushNotificationiOSType } from './libs';
|
|
2
3
|
import { StreamVideoClient } from '@stream-io/video-client';
|
|
4
|
+
import { Event } from '@notifee/react-native';
|
|
3
5
|
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
6
|
+
export declare const oniOSExpoNotificationEvent: (event: ExpoNotification) => void;
|
|
7
|
+
export declare const oniOSNotifeeEvent: ({ event, }: {
|
|
8
|
+
event: Event;
|
|
9
|
+
isBackground: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
export declare function onPushNotificationiOSStreamVideoEvent(notification: PushNotificationiOSType): void;
|
|
7
12
|
/** Send token to stream */
|
|
8
13
|
export declare function initIosNonVoipToken(client: StreamVideoClient, pushConfig: PushConfig, setUnsubscribeListener: (unsubscribe: () => void) => void): Promise<void>;
|
|
9
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EACL,gBAAgB,EAGhB,uBAAuB,EACxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,iBAAiB,EAAa,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAa,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAIzD,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAkBzD,eAAO,MAAM,0BAA0B,UAAW,gBAAgB,SASjE,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAE3B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,SAaA,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,YAAY,EAAE,uBAAuB,QAiBtC;AAED,2BAA2B;AAC3B,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBAiD1D"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export type ExpoNotificationsLib = typeof import('expo-notifications');
|
|
2
|
+
import type { Notification } from 'expo-notifications';
|
|
3
|
+
export type ExpoNotification = Notification;
|
|
2
4
|
export declare function getExpoNotificationsLib(): typeof import("expo-notifications");
|
|
3
5
|
//# sourceMappingURL=expoNotifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expoNotifications.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/expoNotifications.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,cAAc,oBAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"expoNotifications.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/expoNotifications.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,cAAc,oBAAoB,CAAC,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAQ5C,wBAAgB,uBAAuB,wCAOtC"}
|
|
@@ -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,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export type PushNotificationIosLib = typeof import('@react-native-community/push-notification-ios').default;
|
|
2
|
+
import type { PushNotification } from '@react-native-community/push-notification-ios';
|
|
3
|
+
export type PushNotificationiOSType = PushNotification;
|
|
2
4
|
export declare function getPushNotificationIosLib(): import("@react-native-community/push-notification-ios").PushNotificationIOSStatic;
|
|
3
5
|
//# sourceMappingURL=iosPushNotification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iosPushNotification.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/iosPushNotification.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAChC,cAAc,+CAA+C,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"iosPushNotification.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/iosPushNotification.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAChC,cAAc,+CAA+C,EAAE,OAAO,CAAC;AAIzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAOvD,wBAAgB,yBAAyB,sFAOxC"}
|