@stream-io/video-react-native-sdk 1.9.18 → 1.9.20
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/commonjs/hooks/useAndroidKeepCallAliveEffect.js +18 -4
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +19 -5
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +22 -5
- package/src/version.ts +1 -1
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
|
+
## [1.9.20](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.9.19...@stream-io/video-react-native-sdk-1.9.20) (2025-02-05)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `1.16.2`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `1.4.10`
|
|
11
|
+
## [1.9.19](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.9.18...@stream-io/video-react-native-sdk-1.9.19) (2025-02-05)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* start foreground service only when app is in active state ([f8bfef8](https://github.com/GetStream/stream-video-js/commit/f8bfef89f8151695bbc405244a9f77097fe6892e))
|
|
17
|
+
|
|
5
18
|
## [1.9.18](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.9.17...@stream-io/video-react-native-sdk-1.9.18) (2025-02-05)
|
|
6
19
|
|
|
7
20
|
### Dependency Updates
|
|
@@ -106,11 +106,25 @@ const useAndroidKeepCallAliveEffect = () => {
|
|
|
106
106
|
notifee.cancelDisplayedNotification(activeCallCid);
|
|
107
107
|
}
|
|
108
108
|
// check for notification permission and then start the foreground service
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
|
|
110
|
+
await startForegroundService(activeCallCid);
|
|
111
|
+
foregroundServiceStartedRef.current = true;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// ensure that app is active before running the function
|
|
115
|
+
if (_reactNative.AppState.currentState === 'active') {
|
|
116
|
+
run();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const sub = _reactNative.AppState.addEventListener('change', nextAppState => {
|
|
120
|
+
if (nextAppState === 'active') {
|
|
121
|
+
run();
|
|
122
|
+
sub.remove();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
return () => {
|
|
126
|
+
sub.remove();
|
|
112
127
|
};
|
|
113
|
-
run();
|
|
114
128
|
} else if (callingState === _videoClient.CallingState.RINGING) {
|
|
115
129
|
return () => {
|
|
116
130
|
// cancel any notifee displayed notification when the call has transitioned out of ringing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_videoReactBindings","require","_react","_utils","_reactNative","_videoClient","_notifee","notifeeLib","getNotifeeLibNoThrowForKeepCallAlive","setForegroundService","default","registerForegroundService","Promise","logger","getLogger","startForegroundService","call_cid","foregroundServiceConfig","StreamVideoRN","getConfig","foregroundService","title","body","android","notificationTexts","settings","getNotificationSettings","authorizationStatus","AuthorizationStatus","AUTHORIZED","channelId","channel","id","createChannel","foregroundServiceTypes","getKeepCallAliveForegroundServiceTypes","requestAnimationFrame","displayNotification","asForegroundService","ongoing","colorized","pressAction","launchActivity","isSetForegroundServiceRan","useAndroidKeepCallAliveEffect","foregroundServiceStartedRef","useRef","call","useCall","activeCallCid","cid","useCallCallingState","useCallStateHooks","callingState","isOutgoingCall","CallingState","RINGING","isCreatedByMe","isCallJoined","JOINED","shouldStartForegroundService","current","useEffect","Platform","OS","run","notifee","displayedNotifications","getDisplayedNotifications","activeCallNotification","find","notification","stopForegroundService","cancelDisplayedNotification","
|
|
1
|
+
{"version":3,"names":["_videoReactBindings","require","_react","_utils","_reactNative","_videoClient","_notifee","notifeeLib","getNotifeeLibNoThrowForKeepCallAlive","setForegroundService","default","registerForegroundService","Promise","logger","getLogger","startForegroundService","call_cid","foregroundServiceConfig","StreamVideoRN","getConfig","foregroundService","title","body","android","notificationTexts","settings","getNotificationSettings","authorizationStatus","AuthorizationStatus","AUTHORIZED","channelId","channel","id","createChannel","foregroundServiceTypes","getKeepCallAliveForegroundServiceTypes","requestAnimationFrame","displayNotification","asForegroundService","ongoing","colorized","pressAction","launchActivity","isSetForegroundServiceRan","useAndroidKeepCallAliveEffect","foregroundServiceStartedRef","useRef","call","useCall","activeCallCid","cid","useCallCallingState","useCallStateHooks","callingState","isOutgoingCall","CallingState","RINGING","isCreatedByMe","isCallJoined","JOINED","shouldStartForegroundService","current","useEffect","Platform","OS","run","notifee","displayedNotifications","getDisplayedNotifications","activeCallNotification","find","notification","stopForegroundService","cancelDisplayedNotification","AppState","currentState","sub","addEventListener","nextAppState","remove","IDLE","LEFT","then","exports"],"sourceRoot":"../../../src","sources":["hooks/useAndroidKeepCallAliveEffect.ts"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,MAAMM,UAAU,GAAG,IAAAC,6CAAoC,EAAC,CAAC;AAEzD,SAASC,oBAAoBA,CAAA,EAAG;EAC9BF,UAAU,EAAEG,OAAO,CAACC,yBAAyB,CAAC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;UAChC,MAAME,sBAAsB,GAAGF,sBAAsB,CAACG,IAAI,CACvDC,YAAY,IAAKA,YAAY,CAACvC,EAAE,KAAKiB,aACxC,CAAC;UACD,IAAIoB,sBAAsB,EAAE;YAC1B;YACA9D,UAAU,CAACG,OAAO,CAAC8D,qBAAqB,CAAC,CAAC;UAC5C;QACF,CAAC,CAAC;MACN;IACF;EACF,CAAC,EAAE,CAACvB,aAAa,EAAEI,YAAY,EAAEO,4BAA4B,CAAC,CAAC;EAE/D,IAAAE,gBAAS,EAAC,MAAM;IACd,OAAO,MAAM;MACX;MACA,IAAIjB,2BAA2B,CAACgB,OAAO,EAAE;QACvC,IAAI,CAACtD,UAAU,EAAE;QACjBA,UAAU,CAACG,OAAO,CAAC8D,qBAAqB,CAAC,CAAC;QAC1C3B,2BAA2B,CAACgB,OAAO,GAAG,KAAK;MAC7C;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACsB,OAAA,CAAAvC,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
package/dist/commonjs/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { StreamVideoRN } from '../utils';
|
|
4
|
-
import { Platform } from 'react-native';
|
|
4
|
+
import { AppState, Platform } from 'react-native';
|
|
5
5
|
import { CallingState, getLogger } from '@stream-io/video-client';
|
|
6
6
|
import { getNotifeeLibNoThrowForKeepCallAlive, getKeepCallAliveForegroundServiceTypes } from '../utils/push/libs/notifee';
|
|
7
7
|
const notifeeLib = getNotifeeLibNoThrowForKeepCallAlive();
|
|
@@ -100,11 +100,25 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
100
100
|
notifee.cancelDisplayedNotification(activeCallCid);
|
|
101
101
|
}
|
|
102
102
|
// check for notification permission and then start the foreground service
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
|
|
104
|
+
await startForegroundService(activeCallCid);
|
|
105
|
+
foregroundServiceStartedRef.current = true;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// ensure that app is active before running the function
|
|
109
|
+
if (AppState.currentState === 'active') {
|
|
110
|
+
run();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const sub = AppState.addEventListener('change', nextAppState => {
|
|
114
|
+
if (nextAppState === 'active') {
|
|
115
|
+
run();
|
|
116
|
+
sub.remove();
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
return () => {
|
|
120
|
+
sub.remove();
|
|
106
121
|
};
|
|
107
|
-
run();
|
|
108
122
|
} else if (callingState === CallingState.RINGING) {
|
|
109
123
|
return () => {
|
|
110
124
|
// cancel any notifee displayed notification when the call has transitioned out of ringing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCall","useCallStateHooks","useEffect","useRef","StreamVideoRN","Platform","CallingState","getLogger","getNotifeeLibNoThrowForKeepCallAlive","getKeepCallAliveForegroundServiceTypes","notifeeLib","setForegroundService","default","registerForegroundService","Promise","logger","startForegroundService","call_cid","foregroundServiceConfig","getConfig","foregroundService","title","body","android","notificationTexts","settings","getNotificationSettings","authorizationStatus","AuthorizationStatus","AUTHORIZED","channelId","channel","id","createChannel","foregroundServiceTypes","requestAnimationFrame","displayNotification","asForegroundService","ongoing","colorized","pressAction","launchActivity","isSetForegroundServiceRan","useAndroidKeepCallAliveEffect","foregroundServiceStartedRef","call","activeCallCid","cid","useCallCallingState","callingState","isOutgoingCall","RINGING","isCreatedByMe","isCallJoined","JOINED","shouldStartForegroundService","current","OS","run","notifee","displayedNotifications","getDisplayedNotifications","activeCallNotification","find","notification","stopForegroundService","cancelDisplayedNotification","
|
|
1
|
+
{"version":3,"names":["useCall","useCallStateHooks","useEffect","useRef","StreamVideoRN","AppState","Platform","CallingState","getLogger","getNotifeeLibNoThrowForKeepCallAlive","getKeepCallAliveForegroundServiceTypes","notifeeLib","setForegroundService","default","registerForegroundService","Promise","logger","startForegroundService","call_cid","foregroundServiceConfig","getConfig","foregroundService","title","body","android","notificationTexts","settings","getNotificationSettings","authorizationStatus","AuthorizationStatus","AUTHORIZED","channelId","channel","id","createChannel","foregroundServiceTypes","requestAnimationFrame","displayNotification","asForegroundService","ongoing","colorized","pressAction","launchActivity","isSetForegroundServiceRan","useAndroidKeepCallAliveEffect","foregroundServiceStartedRef","call","activeCallCid","cid","useCallCallingState","callingState","isOutgoingCall","RINGING","isCreatedByMe","isCallJoined","JOINED","shouldStartForegroundService","current","OS","run","notifee","displayedNotifications","getDisplayedNotifications","activeCallNotification","find","notification","stopForegroundService","cancelDisplayedNotification","currentState","sub","addEventListener","nextAppState","remove","IDLE","LEFT","then"],"sourceRoot":"../../../src","sources":["hooks/useAndroidKeepCallAliveEffect.ts"],"mappings":"AAAA,SAASA,OAAO,EAAEC,iBAAiB,QAAQ,iCAAiC;AAC5E,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,aAAa,QAAQ,UAAU;AACxC,SAASC,QAAQ,EAAkBC,QAAQ,QAAQ,cAAc;AACjE,SAASC,YAAY,EAAEC,SAAS,QAAQ,yBAAyB;AACjE,SACEC,oCAAoC,EACpCC,sCAAsC,QACjC,4BAA4B;AAEnC,MAAMC,UAAU,GAAGF,oCAAoC,CAAC,CAAC;AAEzD,SAASG,oBAAoBA,CAAA,EAAG;EAC9BD,UAAU,EAAEE,OAAO,CAACC,yBAAyB,CAAC,MAAM;IAClD,OAAO,IAAIC,OAAO,CAAC,MAAM;MACvB,MAAMC,MAAM,GAAGR,SAAS,CAAC,CAAC,6BAA6B,CAAC,CAAC;MACzDQ,MAAM,CAAC,MAAM,EAAE,iDAAiD,CAAC;IACnE,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ;AAEA,eAAeC,sBAAsBA,CAACC,QAAgB,EAAE;EACtD,MAAMC,uBAAuB,GAAGf,aAAa,CAACgB,SAAS,CAAC,CAAC,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AAM;MACX;MACA,IAAI2C,2BAA2B,CAACY,OAAO,EAAE;QACvC,IAAI,CAAC9C,UAAU,EAAE;QACjBA,UAAU,CAACE,OAAO,CAACqD,qBAAqB,CAAC,CAAC;QAC1CrB,2BAA2B,CAACY,OAAO,GAAG,KAAK;MAC7C;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;AACR,CAAC","ignoreList":[]}
|
package/dist/module/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '1.9.
|
|
1
|
+
export const version = '1.9.20';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,YAyGzC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.9.
|
|
1
|
+
export declare const version = "1.9.20";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.20",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"module": "dist/module/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"!**/.*"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@stream-io/video-client": "1.16.
|
|
50
|
-
"@stream-io/video-react-bindings": "1.4.
|
|
49
|
+
"@stream-io/video-client": "1.16.2",
|
|
50
|
+
"@stream-io/video-react-bindings": "1.4.10",
|
|
51
51
|
"intl-pluralrules": "2.0.1",
|
|
52
52
|
"lodash.merge": "^4.6.2",
|
|
53
53
|
"react-native-url-polyfill": "1.3.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { StreamVideoRN } from '../utils';
|
|
4
|
-
import { Platform } from 'react-native';
|
|
4
|
+
import { AppState, AppStateStatus, Platform } from 'react-native';
|
|
5
5
|
import { CallingState, getLogger } from '@stream-io/video-client';
|
|
6
6
|
import {
|
|
7
7
|
getNotifeeLibNoThrowForKeepCallAlive,
|
|
@@ -116,11 +116,28 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
116
116
|
notifee.cancelDisplayedNotification(activeCallCid);
|
|
117
117
|
}
|
|
118
118
|
// check for notification permission and then start the foreground service
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
|
|
120
|
+
await startForegroundService(activeCallCid);
|
|
121
|
+
foregroundServiceStartedRef.current = true;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// ensure that app is active before running the function
|
|
125
|
+
if (AppState.currentState === 'active') {
|
|
126
|
+
run();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const sub = AppState.addEventListener(
|
|
130
|
+
'change',
|
|
131
|
+
(nextAppState: AppStateStatus) => {
|
|
132
|
+
if (nextAppState === 'active') {
|
|
133
|
+
run();
|
|
134
|
+
sub.remove();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
return () => {
|
|
139
|
+
sub.remove();
|
|
122
140
|
};
|
|
123
|
-
run();
|
|
124
141
|
} else if (callingState === CallingState.RINGING) {
|
|
125
142
|
return () => {
|
|
126
143
|
// cancel any notifee displayed notification when the call has transitioned out of ringing
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.9.
|
|
1
|
+
export const version = '1.9.20';
|