@stream-io/video-react-native-sdk 1.31.1-beta.0 → 1.31.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 +11 -0
- package/android/src/main/AndroidManifest.xml +1 -8
- package/android/src/main/AndroidManifestNew.xml +0 -11
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +5 -42
- package/android/src/main/java/com/streamvideo/reactnative/audio/utils/WebRtcAudioUtils.kt +6 -70
- package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +4 -6
- package/android/src/main/java/com/streamvideo/reactnative/util/CallAliveServiceChecker.kt +95 -0
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js +2 -6
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
- package/dist/commonjs/hooks/push/index.js +2 -0
- package/dist/commonjs/hooks/push/index.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +160 -0
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +67 -0
- package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +1 -0
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +97 -64
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/index.js +0 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +0 -26
- package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/index.js +6 -6
- package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +21 -35
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +3 -53
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +202 -135
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/ios.js +34 -17
- package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js +45 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/commonjs/utils/push/internal/utils.js +53 -71
- package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
- package/dist/commonjs/utils/push/ios.js.map +1 -1
- package/dist/commonjs/utils/push/libs/callkeep.js +17 -0
- package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -0
- package/dist/commonjs/utils/push/libs/index.js +19 -8
- package/dist/commonjs/utils/push/libs/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/notifee/index.js +19 -0
- package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/voipPushNotification.js +17 -0
- package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +205 -0
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +6 -7
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/commonjs/version.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js +2 -6
- package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
- package/dist/module/hooks/push/index.js +2 -0
- package/dist/module/hooks/push/index.js.map +1 -1
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +153 -0
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/push/useProcessPushCallEffect.js +60 -0
- package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -0
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +99 -66
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +0 -26
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/providers/StreamCall/index.js +6 -6
- package/dist/module/providers/StreamCall/index.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +21 -35
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/registerSDKGlobals.js +3 -53
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +204 -137
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +34 -17
- package/dist/module/utils/push/internal/ios.js.map +1 -1
- package/dist/module/utils/push/internal/rxSubjects.js +44 -0
- package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +50 -67
- package/dist/module/utils/push/internal/utils.js.map +1 -1
- package/dist/module/utils/push/ios.js.map +1 -1
- package/dist/module/utils/push/libs/callkeep.js +11 -0
- package/dist/module/utils/push/libs/callkeep.js.map +1 -0
- package/dist/module/utils/push/libs/index.js +2 -1
- package/dist/module/utils/push/libs/index.js.map +1 -1
- package/dist/module/utils/push/libs/notifee/index.js +18 -0
- package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/module/utils/push/libs/voipPushNotification.js +11 -0
- package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -0
- package/dist/module/utils/push/setupIosCallKeepEvents.js +199 -0
- package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/module/utils/push/setupIosVoipPushEvents.js +6 -7
- package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/version.js.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantLabel.d.ts.map +1 -1
- package/dist/typescript/hooks/push/index.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts +5 -0
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +1 -0
- package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts +8 -0
- package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts.map +1 -0
- package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
- package/dist/typescript/index.d.ts +0 -1
- package/dist/typescript/index.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts +0 -5
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +2 -22
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +25 -59
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts +2 -1
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts +33 -0
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/utils.d.ts +8 -14
- package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
- package/dist/typescript/utils/push/ios.d.ts +2 -1
- package/dist/typescript/utils/push/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/callkeep.d.ts +3 -0
- package/dist/typescript/utils/push/libs/callkeep.d.ts.map +1 -0
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +2 -16
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/index.d.ts +2 -1
- package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/notifee/index.d.ts +1 -0
- package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +3 -0
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +1 -0
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts +6 -0
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +1 -0
- package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/dist/typescript/version.d.ts.map +1 -1
- package/expo-config-plugin/dist/withAndroidManifest.js +33 -1
- package/expo-config-plugin/dist/withAndroidPermissions.js +7 -2
- package/expo-config-plugin/dist/withAppDelegate.js +197 -19
- package/expo-config-plugin/dist/withMainActivity.js +1 -1
- package/expo-config-plugin/dist/withiOSInfoPlist.js +3 -2
- package/ios/StreamInCallManager.m +0 -2
- package/ios/StreamInCallManager.swift +7 -19
- package/ios/StreamVideoReactNative.h +4 -7
- package/ios/StreamVideoReactNative.m +82 -189
- package/package.json +16 -11
- package/src/components/Participant/ParticipantView/ParticipantLabel.tsx +2 -7
- package/src/hooks/push/index.ts +2 -0
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +235 -0
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +34 -21
- package/src/hooks/push/useProcessPushCallEffect.ts +108 -0
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +120 -94
- package/src/index.ts +0 -1
- package/src/modules/call-manager/CallManager.ts +0 -36
- package/src/modules/call-manager/native-module.d.ts +0 -7
- package/src/providers/StreamCall/index.tsx +6 -6
- package/src/utils/StreamVideoRN/index.ts +30 -42
- package/src/utils/StreamVideoRN/types.ts +25 -61
- package/src/utils/internal/registerSDKGlobals.ts +4 -52
- package/src/utils/push/android.ts +311 -198
- package/src/utils/push/internal/ios.ts +44 -28
- package/src/utils/push/internal/rxSubjects.ts +61 -0
- package/src/utils/push/internal/utils.ts +64 -108
- package/src/utils/push/ios.ts +6 -1
- package/src/utils/push/libs/callkeep.ts +16 -0
- package/src/utils/push/libs/index.ts +2 -1
- package/src/utils/push/libs/notifee/index.ts +27 -0
- package/src/utils/push/libs/voipPushNotification.ts +17 -0
- package/src/utils/push/setupIosCallKeepEvents.ts +252 -0
- package/src/utils/push/setupIosVoipPushEvents.ts +7 -11
- package/src/version.ts +1 -1
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/KeepAliveNotification.kt +0 -83
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +0 -149
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +0 -144
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js +0 -68
- package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js.map +0 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +0 -150
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +0 -1
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +0 -48
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +0 -1
- package/dist/commonjs/utils/push/libs/callingx.js +0 -75
- package/dist/commonjs/utils/push/libs/callingx.js.map +0 -1
- package/dist/commonjs/utils/push/setupCallingExpEvents.js +0 -105
- package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +0 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +0 -137
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/module/utils/internal/callingx/audioSessionPromise.js +0 -61
- package/dist/module/utils/internal/callingx/audioSessionPromise.js.map +0 -1
- package/dist/module/utils/internal/callingx/callingx.js +0 -140
- package/dist/module/utils/internal/callingx/callingx.js.map +0 -1
- package/dist/module/utils/keepCallAliveHeadlessTask.js +0 -42
- package/dist/module/utils/keepCallAliveHeadlessTask.js.map +0 -1
- package/dist/module/utils/push/libs/callingx.js +0 -67
- package/dist/module/utils/push/libs/callingx.js.map +0 -1
- package/dist/module/utils/push/setupCallingExpEvents.js +0 -99
- package/dist/module/utils/push/setupCallingExpEvents.js.map +0 -1
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts +0 -5
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +0 -1
- package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts +0 -16
- package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts.map +0 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts +0 -18
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +0 -1
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +0 -10
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/callingx.d.ts +0 -9
- package/dist/typescript/utils/push/libs/callingx.d.ts.map +0 -1
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts +0 -8
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +0 -1
- package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +0 -189
- package/src/utils/internal/callingx/audioSessionPromise.ts +0 -65
- package/src/utils/internal/callingx/callingx.ts +0 -194
- package/src/utils/keepCallAliveHeadlessTask.ts +0 -54
- package/src/utils/push/libs/callingx.ts +0 -89
- package/src/utils/push/setupCallingExpEvents.ts +0 -135
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.31.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.31.0...@stream-io/video-react-native-sdk-1.31.1) (2026-04-02)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
- `@stream-io/video-client` updated to version `1.45.0`
|
|
10
|
+
- `@stream-io/video-react-bindings` updated to version `1.13.15`
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **pins:** render the "pin" indicator regardless of "unpin" capabilities ([#2179](https://github.com/GetStream/stream-video-js/issues/2179)) ([f78cf41](https://github.com/GetStream/stream-video-js/commit/f78cf4115f7fb3f3eb799ac406c3f56cc691c942))
|
|
15
|
+
|
|
5
16
|
## [1.31.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.30.5...@stream-io/video-react-native-sdk-1.31.0) (2026-03-31)
|
|
6
17
|
|
|
7
18
|
### Dependency Updates
|
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
package="com.streamvideo.reactnative">
|
|
3
3
|
|
|
4
4
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
5
|
+
<uses-permission android:name="android.permission.DEVICE_POWER" />
|
|
5
6
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
6
|
-
|
|
7
|
-
<application>
|
|
8
|
-
<service
|
|
9
|
-
android:name="com.streamvideo.reactnative.keepalive.StreamCallKeepAliveHeadlessService"
|
|
10
|
-
android:exported="false"
|
|
11
|
-
android:stopWithTask="true"
|
|
12
|
-
android:foregroundServiceType="mediaPlayback|camera|microphone" />
|
|
13
|
-
</application>
|
|
14
7
|
</manifest>
|
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
-
|
|
3
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
4
|
-
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
5
|
-
|
|
6
|
-
<application>
|
|
7
|
-
<service
|
|
8
|
-
android:name="com.streamvideo.reactnative.keepalive.StreamCallKeepAliveHeadlessService"
|
|
9
|
-
android:exported="false"
|
|
10
|
-
android:stopWithTask="true"
|
|
11
|
-
android:foregroundServiceType="mediaPlayback|camera|microphone" />
|
|
12
|
-
</application>
|
|
13
2
|
</manifest>
|
|
@@ -17,7 +17,6 @@ import android.os.Build
|
|
|
17
17
|
import android.os.PowerManager
|
|
18
18
|
import android.util.Base64
|
|
19
19
|
import android.util.Log
|
|
20
|
-
import androidx.core.content.ContextCompat
|
|
21
20
|
import com.facebook.react.bridge.Arguments
|
|
22
21
|
import com.facebook.react.bridge.Promise
|
|
23
22
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
@@ -28,8 +27,8 @@ import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEm
|
|
|
28
27
|
import com.oney.WebRTCModule.WebRTCModule
|
|
29
28
|
import com.oney.WebRTCModule.WebRTCModuleOptions
|
|
30
29
|
import com.streamvideo.reactnative.screenshare.ScreenAudioCapture
|
|
31
|
-
import com.streamvideo.reactnative.keepalive.StreamCallKeepAliveHeadlessService
|
|
32
30
|
import com.streamvideo.reactnative.util.CallAlivePermissionsHelper
|
|
31
|
+
import com.streamvideo.reactnative.util.CallAliveServiceChecker
|
|
33
32
|
import com.streamvideo.reactnative.util.PiPHelper
|
|
34
33
|
import com.streamvideo.reactnative.util.RingtoneUtil
|
|
35
34
|
import com.streamvideo.reactnative.util.YuvFrame
|
|
@@ -123,47 +122,11 @@ class StreamVideoReactNativeModule(reactContext: ReactApplicationContext) :
|
|
|
123
122
|
promise.resolve(false)
|
|
124
123
|
return
|
|
125
124
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
@ReactMethod
|
|
133
|
-
fun startKeepCallAliveService(
|
|
134
|
-
callCid: String,
|
|
135
|
-
channelId: String,
|
|
136
|
-
channelName: String,
|
|
137
|
-
title: String,
|
|
138
|
-
body: String,
|
|
139
|
-
smallIconName: String?,
|
|
140
|
-
promise: Promise
|
|
141
|
-
) {
|
|
142
|
-
try {
|
|
143
|
-
val intent = StreamCallKeepAliveHeadlessService.buildStartIntent(
|
|
144
|
-
reactApplicationContext,
|
|
145
|
-
callCid,
|
|
146
|
-
channelId,
|
|
147
|
-
channelName,
|
|
148
|
-
title,
|
|
149
|
-
body,
|
|
150
|
-
smallIconName
|
|
151
|
-
)
|
|
152
|
-
ContextCompat.startForegroundService(reactApplicationContext, intent)
|
|
125
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
|
126
|
+
val isForegroundServiceDeclared = CallAliveServiceChecker.isForegroundServiceDeclared(reactApplicationContext)
|
|
127
|
+
promise.resolve(isForegroundServiceDeclared)
|
|
128
|
+
} else {
|
|
153
129
|
promise.resolve(true)
|
|
154
|
-
} catch (e: Exception) {
|
|
155
|
-
promise.reject(NAME, "Failed to start keep call alive foreground service", e)
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@ReactMethod
|
|
160
|
-
fun stopKeepCallAliveService(promise: Promise) {
|
|
161
|
-
try {
|
|
162
|
-
val intent = StreamCallKeepAliveHeadlessService.buildStopIntent(reactApplicationContext)
|
|
163
|
-
val stopped = reactApplicationContext.stopService(intent)
|
|
164
|
-
promise.resolve(stopped)
|
|
165
|
-
} catch (e: Exception) {
|
|
166
|
-
promise.reject(NAME, "Failed to stop keep call alive foreground service", e)
|
|
167
130
|
}
|
|
168
131
|
}
|
|
169
132
|
|
|
@@ -55,78 +55,14 @@ object WebRtcAudioUtils {
|
|
|
55
55
|
* what might be the root cause.
|
|
56
56
|
*/
|
|
57
57
|
fun logAudioState(tag: String, reactContext: ReactContext) {
|
|
58
|
-
Log.d(tag, getAudioStateLog(reactContext))
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Returns a string containing information about the current audio state.
|
|
63
|
-
* Similar to logAudioState but returns the information instead of logging it.
|
|
64
|
-
*/
|
|
65
|
-
fun getAudioStateLog(reactContext: ReactContext): String {
|
|
66
|
-
val audioManager = reactContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
|
67
|
-
val sb = StringBuilder()
|
|
68
|
-
|
|
69
|
-
// Volume control stream
|
|
70
58
|
reactContext.currentActivity?.let {
|
|
71
|
-
|
|
59
|
+
Log.d(tag, "volumeControlStream: " + streamTypeToString(it.volumeControlStream))
|
|
72
60
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
sb.appendLine("Audio State: audio mode: ${modeToString(audioManager.mode)}, has mic: ${hasMicrophone(reactContext)}, mic muted: ${audioManager.isMicrophoneMute}, music active: ${audioManager.isMusicActive}, speakerphone: ${audioManager.isSpeakerphoneOn}, BT SCO: ${audioManager.isBluetoothScoOn}")
|
|
79
|
-
|
|
80
|
-
// Volume info
|
|
81
|
-
val fixedVolume = audioManager.isVolumeFixed
|
|
82
|
-
sb.appendLine(" fixed volume=$fixedVolume")
|
|
83
|
-
if (!fixedVolume) {
|
|
84
|
-
val streams = intArrayOf(
|
|
85
|
-
AudioManager.STREAM_VOICE_CALL,
|
|
86
|
-
AudioManager.STREAM_MUSIC,
|
|
87
|
-
AudioManager.STREAM_RING,
|
|
88
|
-
AudioManager.STREAM_ALARM,
|
|
89
|
-
AudioManager.STREAM_NOTIFICATION,
|
|
90
|
-
AudioManager.STREAM_SYSTEM
|
|
91
|
-
)
|
|
92
|
-
for (stream in streams) {
|
|
93
|
-
val info = StringBuilder()
|
|
94
|
-
info.append(" ${streamTypeToString(stream)}: ")
|
|
95
|
-
info.append("volume=${audioManager.getStreamVolume(stream)}")
|
|
96
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
97
|
-
info.append(", min=${audioManager.getStreamMinVolume(stream)}")
|
|
98
|
-
}
|
|
99
|
-
info.append(", max=${audioManager.getStreamMaxVolume(stream)}")
|
|
100
|
-
info.append(", muted=${audioManager.isStreamMute(stream)}")
|
|
101
|
-
sb.appendLine(info.toString())
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Audio devices
|
|
106
|
-
val inputDevices = audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS)
|
|
107
|
-
val outputDevices = audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS)
|
|
108
|
-
val devices = inputDevices + outputDevices
|
|
109
|
-
if (devices.isNotEmpty()) {
|
|
110
|
-
sb.appendLine("Audio Devices:")
|
|
111
|
-
for (device in devices) {
|
|
112
|
-
val info = StringBuilder()
|
|
113
|
-
info.append(" ${deviceTypeToString(device.type)}")
|
|
114
|
-
info.append(if (device.isSource) "(in): " else "(out): ")
|
|
115
|
-
if (device.channelCounts.isNotEmpty()) {
|
|
116
|
-
info.append("channels=${device.channelCounts.contentToString()}, ")
|
|
117
|
-
}
|
|
118
|
-
if (device.encodings.isNotEmpty()) {
|
|
119
|
-
info.append("encodings=${device.encodings.contentToString()}, ")
|
|
120
|
-
}
|
|
121
|
-
if (device.sampleRates.isNotEmpty()) {
|
|
122
|
-
info.append("sample rates=${device.sampleRates.contentToString()}, ")
|
|
123
|
-
}
|
|
124
|
-
info.append("id=${device.id}")
|
|
125
|
-
sb.appendLine(info.toString())
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return sb.toString()
|
|
61
|
+
val audioManager = reactContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
|
62
|
+
logDeviceInfo(tag)
|
|
63
|
+
logAudioStateBasic(tag, reactContext, audioManager)
|
|
64
|
+
logAudioStateVolume(tag, audioManager)
|
|
65
|
+
logAudioDeviceInfo(tag, audioManager)
|
|
130
66
|
}
|
|
131
67
|
|
|
132
68
|
/** Converts AudioDeviceInfo types to local string representation. */
|
package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt
CHANGED
|
@@ -168,12 +168,10 @@ class StreamInCallManagerModule(reactContext: ReactApplicationContext) :
|
|
|
168
168
|
|
|
169
169
|
@ReactMethod
|
|
170
170
|
fun logAudioState() {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
fun getAudioStateLog(): String {
|
|
176
|
-
return WebRtcAudioUtils.getAudioStateLog(reactApplicationContext)
|
|
171
|
+
WebRtcAudioUtils.logAudioState(
|
|
172
|
+
TAG,
|
|
173
|
+
reactApplicationContext,
|
|
174
|
+
)
|
|
177
175
|
}
|
|
178
176
|
|
|
179
177
|
@Suppress("unused")
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
package com.streamvideo.reactnative.util
|
|
2
|
+
|
|
3
|
+
import android.content.ComponentName
|
|
4
|
+
import android.content.pm.PackageManager
|
|
5
|
+
import android.content.pm.ServiceInfo
|
|
6
|
+
import android.os.Build
|
|
7
|
+
import android.util.Log
|
|
8
|
+
import androidx.annotation.RequiresApi
|
|
9
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
10
|
+
|
|
11
|
+
@RequiresApi(api = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
|
12
|
+
object CallAliveServiceChecker {
|
|
13
|
+
private const val NAME = "StreamVideoReactNative"
|
|
14
|
+
|
|
15
|
+
fun isForegroundServiceDeclared(context: ReactApplicationContext): Boolean {
|
|
16
|
+
val packageManager = context.packageManager
|
|
17
|
+
val packageName = context.packageName // Get the package name of your app
|
|
18
|
+
val componentName = ComponentName(
|
|
19
|
+
packageName,
|
|
20
|
+
"app.notifee.core.ForegroundService"
|
|
21
|
+
) // Use service name string
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
val serviceInfo =
|
|
25
|
+
packageManager.getServiceInfo(componentName, PackageManager.GET_META_DATA)
|
|
26
|
+
|
|
27
|
+
val expectedForegroundServiceTypes =
|
|
28
|
+
ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE or
|
|
29
|
+
ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK or
|
|
30
|
+
ServiceInfo.FOREGROUND_SERVICE_TYPE_CAMERA or
|
|
31
|
+
ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
|
|
32
|
+
|
|
33
|
+
val actualForegroundServiceTypes = serviceInfo.foregroundServiceType
|
|
34
|
+
|
|
35
|
+
if (actualForegroundServiceTypes == expectedForegroundServiceTypes) {
|
|
36
|
+
return true
|
|
37
|
+
} else {
|
|
38
|
+
Log.w(
|
|
39
|
+
NAME,
|
|
40
|
+
"android:foregroundServiceType does not match: expected=${
|
|
41
|
+
foregroundServiceTypeToString(
|
|
42
|
+
expectedForegroundServiceTypes
|
|
43
|
+
)
|
|
44
|
+
}, actual=${foregroundServiceTypeToString(actualForegroundServiceTypes)}"
|
|
45
|
+
)
|
|
46
|
+
return false
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
50
|
+
Log.d(NAME, "Service not found: " + e.message)
|
|
51
|
+
return false // Service not declared
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private fun foregroundServiceTypeToString(foregroundServiceType: Int): String {
|
|
56
|
+
val types = mutableListOf<String>()
|
|
57
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE != 0) {
|
|
58
|
+
types.add("shortService")
|
|
59
|
+
}
|
|
60
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC != 0) {
|
|
61
|
+
types.add("dataSync")
|
|
62
|
+
}
|
|
63
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_CAMERA != 0) {
|
|
64
|
+
types.add("camera")
|
|
65
|
+
}
|
|
66
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE != 0) {
|
|
67
|
+
types.add("microphone")
|
|
68
|
+
}
|
|
69
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE != 0) {
|
|
70
|
+
types.add("connectedDevice")
|
|
71
|
+
}
|
|
72
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION != 0) {
|
|
73
|
+
types.add("location")
|
|
74
|
+
}
|
|
75
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK != 0) {
|
|
76
|
+
types.add("mediaPlayback")
|
|
77
|
+
}
|
|
78
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION != 0) {
|
|
79
|
+
types.add("mediaProjection")
|
|
80
|
+
}
|
|
81
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALL != 0) {
|
|
82
|
+
types.add("phoneCall")
|
|
83
|
+
}
|
|
84
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_HEALTH != 0) {
|
|
85
|
+
types.add("health")
|
|
86
|
+
}
|
|
87
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING != 0) {
|
|
88
|
+
types.add("remoteMessaging")
|
|
89
|
+
}
|
|
90
|
+
if (foregroundServiceType and ServiceInfo.FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED != 0) {
|
|
91
|
+
types.add("systemExempted")
|
|
92
|
+
}
|
|
93
|
+
return types.joinToString("|")
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -57,13 +57,9 @@ const ParticipantLabel = ({
|
|
|
57
57
|
} = (0, _videoReactBindings.useI18n)();
|
|
58
58
|
const participantName = name ?? userId;
|
|
59
59
|
const participantLabel = isLocalParticipant ? t('You') : participantName;
|
|
60
|
-
const isPinningEnabled = pin?.isLocalPin;
|
|
61
60
|
const isAudioMuted = !(0, _videoClient.hasAudio)(participant);
|
|
62
61
|
const isVideoMuted = !(0, _videoClient.hasVideo)(participant);
|
|
63
62
|
const isTrackPaused = trackType && (0, _videoClient.hasPausedTrack)(participant, trackType);
|
|
64
|
-
const unPinParticipantHandler = () => {
|
|
65
|
-
call?.unpin(sessionId);
|
|
66
|
-
};
|
|
67
63
|
if (trackType === 'screenShareTrack') {
|
|
68
64
|
const screenShareText = isLocalParticipant ? t('You are sharing your screen') : t('{{ userName }} is sharing their screen', {
|
|
69
65
|
userName: participantName
|
|
@@ -111,9 +107,9 @@ const ParticipantLabel = ({
|
|
|
111
107
|
}, /*#__PURE__*/_react.default.createElement(_icons.BadNetwork, {
|
|
112
108
|
color: colors.iconPrimary,
|
|
113
109
|
size: iconSizes.sm
|
|
114
|
-
})),
|
|
110
|
+
})), pin && /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
115
111
|
style: [styles.pinIconContainer, pinIconContainer],
|
|
116
|
-
onPress:
|
|
112
|
+
onPress: pin.isLocalPin ? () => call?.unpin(sessionId) : undefined
|
|
117
113
|
}, /*#__PURE__*/_react.default.createElement(_icons.PinVertical, {
|
|
118
114
|
color: colors.iconPrimary,
|
|
119
115
|
size: iconSizes.sm
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_icons","_videoReactBindings","_TestIds","_constants","_videoClient","_ThemeContext","_SpeechIndicator","_interopRequireDefault","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ParticipantLabel","participant","trackType","theme","colors","typefaces","variants","iconSizes","participantLabel","container","userNameLabel","audioMutedIconContainer","videoMutedIconContainer","pinIconContainer","screenShareIconContainer","useTheme","styles","useStyles","name","userId","pin","sessionId","isLocalParticipant","useCall","useI18n","participantName","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_icons","_videoReactBindings","_TestIds","_constants","_videoClient","_ThemeContext","_SpeechIndicator","_interopRequireDefault","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ParticipantLabel","participant","trackType","theme","colors","typefaces","variants","iconSizes","participantLabel","container","userNameLabel","audioMutedIconContainer","videoMutedIconContainer","pinIconContainer","screenShareIconContainer","useTheme","styles","useStyles","name","userId","pin","sessionId","isLocalParticipant","useCall","useI18n","participantName","isAudioMuted","hasAudio","isVideoMuted","hasVideo","isTrackPaused","hasPausedTrack","screenShareText","userName","createElement","View","style","backgroundColor","sheetOverlay","testID","ComponentTestIds","PARTICIPANT_SCREEN_SHARING","height","md","width","ScreenShareIndicator","color","iconPrimary","Text","textPrimary","caption","numberOfLines","wrapper","MicOff","size","sm","VideoSlash","trackPausedIconContainer","BadNetwork","Pressable","onPress","isLocalPin","unpin","undefined","PinVertical","indicatorWrapper","isSpeaking","isDominantSpeaker","exports","useMemo","StyleSheet","create","marginLeft","spacingSizes","flexDirection","alignItems","padding","maxHeight","borderTopRightRadius","marginBottom","flexShrink","zIndex","Z_INDEX","IN_FRONT","marginTop","fontSize","fontWeight","marginRight","justifyContent","xs"],"sourceRoot":"../../../../../src","sources":["components/Participant/ParticipantView/ParticipantLabel.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAC,sBAAA,CAAAT,OAAA;AAAgD,SAAAS,uBAAAC,CAAA,WAAAA,CA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AC3CiC,cAAc,EAAE;IAClB,CAAC;IACD7E,uBAAuB,EAAE;MACvB6D,UAAU,EAAErE,KAAK,CAACG,QAAQ,CAACmE,YAAY,CAACgB,EAAE;MAC1CD,cAAc,EAAE;IAClB,CAAC;IACD5E,uBAAuB,EAAE;MACvB4D,UAAU,EAAErE,KAAK,CAACG,QAAQ,CAACmE,YAAY,CAACgB,EAAE;MAC1CD,cAAc,EAAE;IAClB,CAAC;IACD/B,wBAAwB,EAAE;MACxBe,UAAU,EAAErE,KAAK,CAACG,QAAQ,CAACmE,YAAY,CAACgB,EAAE;MAC1CD,cAAc,EAAE;IAClB,CAAC;IACD3E,gBAAgB,EAAE;MAChB2D,UAAU,EAAErE,KAAK,CAACG,QAAQ,CAACmE,YAAY,CAACgB,EAAE;MAC1CD,cAAc,EAAE;IAClB;EACF,CAAC,CAAC,EACJ,CAACrF,KAAK,CACR,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.usePushRegisterEffect = void 0;
|
|
7
7
|
var _useIosVoipPushEventsSetupEffect = require("./useIosVoipPushEventsSetupEffect");
|
|
8
|
+
var _useProcessPushCallEffect = require("./useProcessPushCallEffect");
|
|
8
9
|
var _useInitAndroidTokenAndRest = require("./useInitAndroidTokenAndRest");
|
|
9
10
|
var _useIosInitRemoteNotifications = require("./useIosInitRemoteNotifications");
|
|
10
11
|
var _useProcessPushNonRingingCallEffect = require("./useProcessPushNonRingingCallEffect");
|
|
@@ -16,6 +17,7 @@ const usePushRegisterEffect = () => {
|
|
|
16
17
|
(0, _useIosInitRemoteNotifications.useIosInitRemoteNotifications)();
|
|
17
18
|
(0, _useIosVoipPushEventsSetupEffect.useIosVoipPushEventsSetupEffect)();
|
|
18
19
|
(0, _useProcessPushNonRingingCallEffect.useProcessPushNonRingingCallEffect)();
|
|
20
|
+
(0, _useProcessPushCallEffect.useProcessPushCallEffect)();
|
|
19
21
|
(0, _useInitAndroidTokenAndRest.useInitAndroidTokenAndRest)();
|
|
20
22
|
};
|
|
21
23
|
exports.usePushRegisterEffect = usePushRegisterEffect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_useIosVoipPushEventsSetupEffect","require","_useInitAndroidTokenAndRest","_useIosInitRemoteNotifications","_useProcessPushNonRingingCallEffect","usePushRegisterEffect","useIosInitRemoteNotifications","useIosVoipPushEventsSetupEffect","useProcessPushNonRingingCallEffect","useInitAndroidTokenAndRest","exports"],"sourceRoot":"../../../../src","sources":["hooks/push/index.ts"],"mappings":";;;;;;AAAA,IAAAA,gCAAA,GAAAC,OAAA;AACA,IAAAC,
|
|
1
|
+
{"version":3,"names":["_useIosVoipPushEventsSetupEffect","require","_useProcessPushCallEffect","_useInitAndroidTokenAndRest","_useIosInitRemoteNotifications","_useProcessPushNonRingingCallEffect","usePushRegisterEffect","useIosInitRemoteNotifications","useIosVoipPushEventsSetupEffect","useProcessPushNonRingingCallEffect","useProcessPushCallEffect","useInitAndroidTokenAndRest","exports"],"sourceRoot":"../../../../src","sources":["hooks/push/index.ts"],"mappings":";;;;;;AAAA,IAAAA,gCAAA,GAAAC,OAAA;AACA,IAAAC,yBAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,8BAAA,GAAAH,OAAA;AACA,IAAAI,mCAAA,GAAAJ,OAAA;AAEA;AACA;AACA;AACA;AACO,MAAMK,qBAAqB,GAAGA,CAAA,KAAM;EACzC,IAAAC,4DAA6B,EAAC,CAAC;EAC/B,IAAAC,gEAA+B,EAAC,CAAC;EACjC,IAAAC,sEAAkC,EAAC,CAAC;EACpC,IAAAC,kDAAwB,EAAC,CAAC;EAC1B,IAAAC,sDAA0B,EAAC,CAAC;AAC9B,CAAC;AAACC,OAAA,CAAAN,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useIosCallkeepWithCallingStateEffect = void 0;
|
|
7
|
+
var _videoClient = require("@stream-io/video-client");
|
|
8
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _utils = require("../../utils");
|
|
12
|
+
var _libs = require("../../utils/push/libs");
|
|
13
|
+
var _rxSubjects = require("../../utils/push/internal/rxSubjects");
|
|
14
|
+
const isNonActiveCallingState = callingState => {
|
|
15
|
+
return callingState === _videoClient.CallingState.IDLE || callingState === _videoClient.CallingState.UNKNOWN || callingState === _videoClient.CallingState.LEFT;
|
|
16
|
+
};
|
|
17
|
+
const isAcceptedCallingState = callingState => {
|
|
18
|
+
return callingState === _videoClient.CallingState.JOINING || callingState === _videoClient.CallingState.JOINED;
|
|
19
|
+
};
|
|
20
|
+
const unsubscribeCallkeepEvents = async activeCallCid => {
|
|
21
|
+
const voipPushNotificationCallCId = _videoClient.RxUtils.getCurrentValue(_rxSubjects.voipPushNotificationCallCId$);
|
|
22
|
+
if (activeCallCid && activeCallCid === voipPushNotificationCallCId) {
|
|
23
|
+
// callkeep events should not be listened anymore so clear the call cid
|
|
24
|
+
_rxSubjects.voipPushNotificationCallCId$.next(undefined);
|
|
25
|
+
}
|
|
26
|
+
return await _reactNative.NativeModules.StreamVideoReactNative?.removeIncomingCall(activeCallCid);
|
|
27
|
+
};
|
|
28
|
+
const logger = _videoClient.videoLoggerSystem.getLogger('useIosCallkeepWithCallingStateEffect');
|
|
29
|
+
const log = message => {
|
|
30
|
+
logger.warn(message);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* This hook is used to inform the callkeep library that the call has been joined or ended.
|
|
35
|
+
*/
|
|
36
|
+
const useIosCallkeepWithCallingStateEffect = () => {
|
|
37
|
+
const activeCall = (0, _videoReactBindings.useCall)();
|
|
38
|
+
const {
|
|
39
|
+
useCallCallingState
|
|
40
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
41
|
+
const callingState = useCallCallingState();
|
|
42
|
+
const [acceptedForegroundCallkeepMap, setAcceptedForegroundCallkeepMap] = (0, _react.useState)();
|
|
43
|
+
(0, _react.useEffect)(() => {
|
|
44
|
+
return () => {
|
|
45
|
+
const pushConfig = _utils.StreamVideoRN.getConfig().push;
|
|
46
|
+
if (_reactNative.Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios?.pushProviderName) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
50
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const callkeep = (0, _libs.getCallKeepLib)();
|
|
54
|
+
// if the component is unmounted and the callID was not reported to callkeep, then report it now
|
|
55
|
+
if (acceptedForegroundCallkeepMap) {
|
|
56
|
+
log(`Ending call in callkeep: ${acceptedForegroundCallkeepMap.cid}, reason: component unmounted and call was present in acceptedForegroundCallkeepMap`);
|
|
57
|
+
unsubscribeCallkeepEvents(acceptedForegroundCallkeepMap.cid).then(() => callkeep.endCall(acceptedForegroundCallkeepMap.uuid));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}, [acceptedForegroundCallkeepMap]);
|
|
61
|
+
const activeCallCid = activeCall?.cid;
|
|
62
|
+
(0, _react.useEffect)(() => {
|
|
63
|
+
return () => {
|
|
64
|
+
const pushConfig = _utils.StreamVideoRN.getConfig().push;
|
|
65
|
+
if (_reactNative.Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios?.pushProviderName || !activeCallCid) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
69
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const nativeDialerAcceptedCallMap = _videoClient.RxUtils.getCurrentValue(_rxSubjects.voipCallkeepAcceptedCallOnNativeDialerMap$);
|
|
73
|
+
const foregroundIncomingCallkeepMap = _videoClient.RxUtils.getCurrentValue(_rxSubjects.voipCallkeepCallOnForegroundMap$);
|
|
74
|
+
const callkeep = (0, _libs.getCallKeepLib)();
|
|
75
|
+
if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
|
|
76
|
+
log(`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in nativeDialerAcceptedCallMap`);
|
|
77
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(nativeDialerAcceptedCallMap.uuid));
|
|
78
|
+
// no need to keep this reference anymore
|
|
79
|
+
_rxSubjects.voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
|
|
80
|
+
} else if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
|
|
81
|
+
log(`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in foregroundIncomingCallkeepMap`);
|
|
82
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(foregroundIncomingCallkeepMap.uuid));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}, [activeCallCid]);
|
|
86
|
+
const pushConfig = _utils.StreamVideoRN.getConfig().push;
|
|
87
|
+
if (_reactNative.Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios.pushProviderName || !activeCallCid) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
91
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Check if current call is still needed to be accepted in callkeep
|
|
97
|
+
*/
|
|
98
|
+
if (isAcceptedCallingState(callingState) && acceptedForegroundCallkeepMap?.cid !== activeCallCid) {
|
|
99
|
+
const callkeep = (0, _libs.getCallKeepLib)();
|
|
100
|
+
// push notification was displayed
|
|
101
|
+
// but the call has been accepted through the app and not through the native dialer
|
|
102
|
+
const foregroundCallkeepMap = _videoClient.RxUtils.getCurrentValue(_rxSubjects.voipCallkeepCallOnForegroundMap$);
|
|
103
|
+
if (foregroundCallkeepMap && foregroundCallkeepMap.cid === activeCallCid) {
|
|
104
|
+
log(
|
|
105
|
+
// @ts-expect-error - types issue
|
|
106
|
+
`Accepting call in callkeep: ${activeCallCid}, reason: callingstate went to ${_videoClient.CallingState[callingState]} and call was present in foregroundCallkeepMap`);
|
|
107
|
+
// no need to keep this reference anymore
|
|
108
|
+
_rxSubjects.voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
109
|
+
_reactNative.NativeModules.StreamVideoReactNative?.removeIncomingCall(activeCallCid).then(() => callkeep.answerIncomingCall(foregroundCallkeepMap.uuid));
|
|
110
|
+
// this call should be accepted in callkeep
|
|
111
|
+
setAcceptedForegroundCallkeepMap(foregroundCallkeepMap);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Check if current call is still needed to be ended in callkeep
|
|
117
|
+
*/
|
|
118
|
+
if (isNonActiveCallingState(callingState)) {
|
|
119
|
+
const callkeep = (0, _libs.getCallKeepLib)();
|
|
120
|
+
|
|
121
|
+
// this was a previously joined call which had push notification displayed
|
|
122
|
+
// the call was accepted through the app and not through native dialer
|
|
123
|
+
// the call was left using the leave button in the app and not through native dialer
|
|
124
|
+
if (activeCallCid === acceptedForegroundCallkeepMap?.cid) {
|
|
125
|
+
log(
|
|
126
|
+
// @ts-expect-error - types issue
|
|
127
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${_videoClient.CallingState[callingState]} and call was present in acceptedForegroundCallkeepMap`);
|
|
128
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(acceptedForegroundCallkeepMap.uuid));
|
|
129
|
+
setAcceptedForegroundCallkeepMap(undefined);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
// this was a call which had push notification displayed but never joined
|
|
133
|
+
// the user rejected in the app and not from native dialer
|
|
134
|
+
const foregroundIncomingCallkeepMap = _videoClient.RxUtils.getCurrentValue(_rxSubjects.voipCallkeepCallOnForegroundMap$);
|
|
135
|
+
if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
|
|
136
|
+
log(
|
|
137
|
+
// @ts-expect-error - types issue
|
|
138
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${_videoClient.CallingState[callingState]} and call was present in foregroundIncomingCallkeepMap`);
|
|
139
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(foregroundIncomingCallkeepMap.uuid));
|
|
140
|
+
// no need to keep this reference anymore
|
|
141
|
+
_rxSubjects.voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
// this was a previously joined call
|
|
145
|
+
// it was an accepted call from native dialer and not from the app
|
|
146
|
+
// the user left using the leave button in the app
|
|
147
|
+
const nativeDialerAcceptedCallMap = _videoClient.RxUtils.getCurrentValue(_rxSubjects.voipCallkeepAcceptedCallOnNativeDialerMap$);
|
|
148
|
+
if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
|
|
149
|
+
log(
|
|
150
|
+
// @ts-expect-error - types issue
|
|
151
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${_videoClient.CallingState[callingState]} and call was present in nativeDialerAcceptedCallMap`);
|
|
152
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(nativeDialerAcceptedCallMap.uuid));
|
|
153
|
+
// no need to keep this reference anymore
|
|
154
|
+
_rxSubjects.voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
exports.useIosCallkeepWithCallingStateEffect = useIosCallkeepWithCallingStateEffect;
|
|
160
|
+
//# sourceMappingURL=useIosCallkeepWithCallingStateEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_videoClient","require","_videoReactBindings","_reactNative","_react","_utils","_libs","_rxSubjects","isNonActiveCallingState","callingState","CallingState","IDLE","UNKNOWN","LEFT","isAcceptedCallingState","JOINING","JOINED","unsubscribeCallkeepEvents","activeCallCid","voipPushNotificationCallCId","RxUtils","getCurrentValue","voipPushNotificationCallCId$","next","undefined","NativeModules","StreamVideoReactNative","removeIncomingCall","logger","videoLoggerSystem","getLogger","log","message","warn","useIosCallkeepWithCallingStateEffect","activeCall","useCall","useCallCallingState","useCallStateHooks","acceptedForegroundCallkeepMap","setAcceptedForegroundCallkeepMap","useState","useEffect","pushConfig","StreamVideoRN","getConfig","push","Platform","OS","ios","pushProviderName","android","incomingCallChannel","callkeep","getCallKeepLib","cid","then","endCall","uuid","nativeDialerAcceptedCallMap","voipCallkeepAcceptedCallOnNativeDialerMap$","foregroundIncomingCallkeepMap","voipCallkeepCallOnForegroundMap$","foregroundCallkeepMap","answerIncomingCall","exports"],"sourceRoot":"../../../../src","sources":["hooks/push/useIosCallkeepWithCallingStateEffect.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAMA,MAAMO,uBAAuB,GAAIC,YAA0B,IAAK;EAC9D,OACEA,YAAY,KAAKC,yBAAY,CAACC,IAAI,IAClCF,YAAY,KAAKC,yBAAY,CAACE,OAAO,IACrCH,YAAY,KAAKC,yBAAY,CAACG,IAAI;AAEtC,CAAC;AAED,MAAMC,sBAAsB,GAAIL,YAA0B,IAAK;EAC7D,OACEA,YAA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