@stream-io/video-react-native-sdk 1.29.0-beta.3 → 1.29.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 +3126 -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/Call/CallContent/CallContent.js +7 -2
- package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js +8 -1
- package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
- package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js +3 -0
- package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.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/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 -33
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +15 -52
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +202 -155
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/ios.js +32 -16
- package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js +20 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/commonjs/utils/push/internal/utils.js +16 -28
- 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/Call/CallContent/CallContent.js +7 -2
- package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/module/components/Call/CallContent/RTCViewPipIOS.js +8 -1
- package/dist/module/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
- package/dist/module/components/Call/CallContent/RTCViewPipNative.js +3 -0
- package/dist/module/components/Call/CallContent/RTCViewPipNative.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/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 -33
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/registerSDKGlobals.js +16 -53
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +204 -157
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +32 -16
- package/dist/module/utils/push/internal/ios.js.map +1 -1
- package/dist/module/utils/push/internal/rxSubjects.js +19 -0
- package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +15 -25
- 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/Call/CallContent/CallContent.d.ts +2 -2
- package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallContent/RTCViewPipIOS.d.ts +4 -0
- package/dist/typescript/components/Call/CallContent/RTCViewPipIOS.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallContent/RTCViewPipNative.d.ts +9 -6
- package/dist/typescript/components/Call/CallContent/RTCViewPipNative.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/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 -20
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +29 -54
- 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 +12 -0
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/utils.d.ts +1 -8
- 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/PictureInPicture/StreamAVPictureInPictureVideoCallViewController.swift +8 -0
- package/ios/PictureInPicture/StreamPictureInPictureController.swift +8 -0
- package/ios/PictureInPicture/StreamPictureInPictureVideoRenderer.swift +10 -0
- package/ios/RTCViewPip.swift +6 -0
- package/ios/RTCViewPipManager.mm +1 -0
- package/ios/StreamInCallManager.m +0 -2
- package/ios/StreamInCallManager.swift +7 -19
- package/ios/StreamVideoReactNative.h +4 -7
- package/ios/StreamVideoReactNative.m +102 -191
- package/package.json +19 -14
- package/src/components/Call/CallContent/CallContent.tsx +6 -1
- package/src/components/Call/CallContent/RTCViewPipIOS.tsx +18 -2
- package/src/components/Call/CallContent/RTCViewPipNative.tsx +4 -7
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +235 -0
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +34 -21
- 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 -40
- package/src/utils/StreamVideoRN/types.ts +29 -56
- package/src/utils/internal/registerSDKGlobals.ts +23 -47
- package/src/utils/push/android.ts +309 -231
- package/src/utils/push/internal/ios.ts +42 -27
- package/src/utils/push/internal/rxSubjects.ts +29 -0
- package/src/utils/push/internal/utils.ts +15 -38
- 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 -134
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +0 -121
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/commonjs/utils/internal/audioSessionPromise.js +0 -57
- package/dist/commonjs/utils/internal/audioSessionPromise.js.map +0 -1
- package/dist/commonjs/utils/internal/callingx.js +0 -136
- package/dist/commonjs/utils/internal/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 -97
- package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +0 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +0 -114
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/module/utils/internal/audioSessionPromise.js +0 -50
- package/dist/module/utils/internal/audioSessionPromise.js.map +0 -1
- package/dist/module/utils/internal/callingx.js +0 -127
- package/dist/module/utils/internal/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 -91
- 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/audioSessionPromise.d.ts +0 -16
- package/dist/typescript/utils/internal/audioSessionPromise.d.ts.map +0 -1
- package/dist/typescript/utils/internal/callingx.d.ts +0 -13
- package/dist/typescript/utils/internal/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 -147
- package/src/utils/internal/audioSessionPromise.ts +0 -52
- package/src/utils/internal/callingx.ts +0 -192
- package/src/utils/keepCallAliveHeadlessTask.ts +0 -54
- package/src/utils/push/libs/callingx.ts +0 -90
- package/src/utils/push/setupCallingExpEvents.ts +0 -117
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["version","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,
|
|
1
|
+
{"version":3,"names":["version","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -25,6 +25,7 @@ export const CallContent = ({
|
|
|
25
25
|
ParticipantVideoFallback,
|
|
26
26
|
ParticipantView,
|
|
27
27
|
VideoRenderer,
|
|
28
|
+
mirror,
|
|
28
29
|
layout = 'grid',
|
|
29
30
|
landscape = false,
|
|
30
31
|
supportedReactions,
|
|
@@ -106,6 +107,7 @@ export const CallContent = ({
|
|
|
106
107
|
landscape,
|
|
107
108
|
showLocalParticipant: isRemoteParticipantInFloatingView,
|
|
108
109
|
ParticipantView,
|
|
110
|
+
mirror,
|
|
109
111
|
CallParticipantsList,
|
|
110
112
|
supportedReactions
|
|
111
113
|
};
|
|
@@ -113,6 +115,7 @@ export const CallContent = ({
|
|
|
113
115
|
...participantViewProps,
|
|
114
116
|
landscape,
|
|
115
117
|
ParticipantView,
|
|
118
|
+
mirror,
|
|
116
119
|
CallParticipantsList,
|
|
117
120
|
ScreenShareOverlay,
|
|
118
121
|
supportedReactions
|
|
@@ -121,7 +124,8 @@ export const CallContent = ({
|
|
|
121
124
|
flexDirection: landscape ? 'row' : 'column'
|
|
122
125
|
};
|
|
123
126
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disablePictureInPicture && /*#__PURE__*/React.createElement(RTCViewPipIOS, {
|
|
124
|
-
includeLocalParticipantVideo: iOSPiPIncludeLocalParticipantVideo
|
|
127
|
+
includeLocalParticipantVideo: iOSPiPIncludeLocalParticipantVideo,
|
|
128
|
+
mirror: mirror
|
|
125
129
|
}), /*#__PURE__*/React.createElement(View, {
|
|
126
130
|
style: [styles.container, landscapeStyles, callContent.container]
|
|
127
131
|
}, /*#__PURE__*/React.createElement(View, {
|
|
@@ -136,7 +140,8 @@ export const CallContent = ({
|
|
|
136
140
|
participant: isRemoteParticipantInFloatingView ? remoteParticipants[0] : localParticipant,
|
|
137
141
|
onPressHandler: handleFloatingViewParticipantSwitch,
|
|
138
142
|
supportedReactions: supportedReactions,
|
|
139
|
-
objectFit: "cover"
|
|
143
|
+
objectFit: "cover",
|
|
144
|
+
mirror: mirror
|
|
140
145
|
}, participantViewProps))), showSpotlightLayout ? /*#__PURE__*/React.createElement(CallParticipantsSpotlight, callParticipantsSpotlightProps) : /*#__PURE__*/React.createElement(CallParticipantsGrid, callParticipantsGridProps)), !isInPiPMode && CallControls && /*#__PURE__*/React.createElement(CallControls, {
|
|
141
146
|
onHangupCallHandler: onHangupCallHandler,
|
|
142
147
|
landscape: landscape
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","useRef","useState","NativeModules","Platform","StyleSheet","View","CallParticipantsGrid","CallParticipantsSpotlight","CallControls","DefaultCallControls","useCall","useCallStateHooks","CallingState","videoLoggerSystem","Z_INDEX","useDebouncedValue","FloatingParticipantView","DefaultFloatingParticipantView","useTheme","useAutoEnterPiPEffect","useIsInPiPMode","ScreenShareOverlay","DefaultScreenShareOverlay","RTCViewPipIOS","getRNInCallManagerLibNoThrow","CallContent","onHangupCallHandler","CallParticipantsList","ParticipantLabel","ParticipantNetworkQualityIndicator","ParticipantReaction","ParticipantVideoFallback","ParticipantView","VideoRenderer","layout","landscape","supportedReactions","initialInCallManagerAudioMode","iOSPiPIncludeLocalParticipantVideo","disablePictureInPicture","showRemoteParticipantInFloatingView","setShowRemoteParticipantInFloatingView","styles","useStyles","theme","callContent","call","useHasOngoingScreenShare","useRemoteParticipants","useLocalParticipant","_remoteParticipants","remoteParticipants","localParticipant","isInPiPMode","hasScreenShare","showSpotlightLayout","OS","unsubFunc","on","getLogger","debug","StreamVideoReactNative","exitPipMode","subscription","state","callingState$","subscribe","LEFT","unsubscribe","showFloatingView","length","isRemoteParticipantInFloatingView","incallManagerModeRef","prevInCallManager","start","media","current","stop","handleFloatingViewParticipantSwitch","prevState","participantViewProps","callParticipantsGridProps","showLocalParticipant","callParticipantsSpotlightProps","landscapeStyles","flexDirection","createElement","Fragment","includeLocalParticipantVideo","style","container","content","callParticipantsContainer","view","topContainer","pointerEvents","_extends","participant","onPressHandler","objectFit","create","flex","paddingBottom","variants","insets","bottom","paddingLeft","left","paddingRight","right","paddingTop","top","backgroundColor","colors","sheetPrimary","absoluteFillObject","zIndex","IN_FRONT"],"sourceRoot":"../../../../../src","sources":["components/Call/CallContent/CallContent.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnE,SACEC,aAAa,EACbC,QAAQ,EACRC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SACEC,oBAAoB,EAEpBC,yBAAyB,QAEpB,eAAe;AACtB,SAEEC,YAAY,IAAIC,mBAAmB,QAE9B,iBAAiB;AACxB,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,iCAAiC;AAC5E,SACEC,YAAY,EAEZC,iBAAiB,QACZ,yBAAyB;AAEhC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SACEC,uBAAuB,IAAIC,8BAA8B,QAGpD,mBAAmB;AAC1B,SAASC,QAAQ,QAAQ,mBAAmB;AAK5C,SAASC,qBAAqB,EAAEC,cAAc,QAAQ,gBAAgB;AACtE,SACEC,kBAAkB,IAAIC,yBAAyB,QAE1C,kCAAkC;AACzC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,4BAA4B,QAAQ,gDAAgD;AA+D7F,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC1BC,mBAAmB;EACnBC,oBAAoB;EACpBnB,YAAY,GAAGC,mBAAmB;EAClCO,uBAAuB,GAAGC,8BAA8B;EACxDI,kBAAkB,GAAGC,yBAAyB;EAC9CM,gBAAgB;EAChBC,kCAAkC;EAClCC,mBAAmB;EACnBC,wBAAwB;EACxBC,eAAe;EACfC,aAAa;EACbC,MAAM,GAAG,MAAM;EACfC,SAAS,GAAG,KAAK;EACjBC,kBAAkB;EAClBC,6BAA6B,GAAG,OAAO;EACvCC,kCAAkC;EAClCC;AACgB,CAAC,KAAK;EACtB,MAAM,CACJC,mCAAmC,EACnCC,sCAAsC,CACvC,
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","useRef","useState","NativeModules","Platform","StyleSheet","View","CallParticipantsGrid","CallParticipantsSpotlight","CallControls","DefaultCallControls","useCall","useCallStateHooks","CallingState","videoLoggerSystem","Z_INDEX","useDebouncedValue","FloatingParticipantView","DefaultFloatingParticipantView","useTheme","useAutoEnterPiPEffect","useIsInPiPMode","ScreenShareOverlay","DefaultScreenShareOverlay","RTCViewPipIOS","getRNInCallManagerLibNoThrow","CallContent","onHangupCallHandler","CallParticipantsList","ParticipantLabel","ParticipantNetworkQualityIndicator","ParticipantReaction","ParticipantVideoFallback","ParticipantView","VideoRenderer","mirror","layout","landscape","supportedReactions","initialInCallManagerAudioMode","iOSPiPIncludeLocalParticipantVideo","disablePictureInPicture","showRemoteParticipantInFloatingView","setShowRemoteParticipantInFloatingView","styles","useStyles","theme","callContent","call","useHasOngoingScreenShare","useRemoteParticipants","useLocalParticipant","_remoteParticipants","remoteParticipants","localParticipant","isInPiPMode","hasScreenShare","showSpotlightLayout","OS","unsubFunc","on","getLogger","debug","StreamVideoReactNative","exitPipMode","subscription","state","callingState$","subscribe","LEFT","unsubscribe","showFloatingView","length","isRemoteParticipantInFloatingView","incallManagerModeRef","prevInCallManager","start","media","current","stop","handleFloatingViewParticipantSwitch","prevState","participantViewProps","callParticipantsGridProps","showLocalParticipant","callParticipantsSpotlightProps","landscapeStyles","flexDirection","createElement","Fragment","includeLocalParticipantVideo","style","container","content","callParticipantsContainer","view","topContainer","pointerEvents","_extends","participant","onPressHandler","objectFit","create","flex","paddingBottom","variants","insets","bottom","paddingLeft","left","paddingRight","right","paddingTop","top","backgroundColor","colors","sheetPrimary","absoluteFillObject","zIndex","IN_FRONT"],"sourceRoot":"../../../../../src","sources":["components/Call/CallContent/CallContent.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnE,SACEC,aAAa,EACbC,QAAQ,EACRC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SACEC,oBAAoB,EAEpBC,yBAAyB,QAEpB,eAAe;AACtB,SAEEC,YAAY,IAAIC,mBAAmB,QAE9B,iBAAiB;AACxB,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,iCAAiC;AAC5E,SACEC,YAAY,EAEZC,iBAAiB,QACZ,yBAAyB;AAEhC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SACEC,uBAAuB,IAAIC,8BAA8B,QAGpD,mBAAmB;AAC1B,SAASC,QAAQ,QAAQ,mBAAmB;AAK5C,SAASC,qBAAqB,EAAEC,cAAc,QAAQ,gBAAgB;AACtE,SACEC,kBAAkB,IAAIC,yBAAyB,QAE1C,kCAAkC;AACzC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,4BAA4B,QAAQ,gDAAgD;AA+D7F,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC1BC,mBAAmB;EACnBC,oBAAoB;EACpBnB,YAAY,GAAGC,mBAAmB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CAACqE,MAAM,CAACC;IAChC,CAAC;IACDvB,OAAO,EAAE;MAAEU,IAAI,EAAE;IAAE,CAAC;IACpBR,IAAI,EAAE;MACJ,GAAG1F,UAAU,CAACgH,kBAAkB;MAChCC,MAAM,EAAEvG,OAAO,CAACwG;IAClB;EACF,CAAC,CAAC,EACJ,CAACzE,KAAK,CACR,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -10,15 +10,20 @@ import { isInPiPMode$ } from '../../../utils/internal/rxSubjects';
|
|
|
10
10
|
export const RTCViewPipIOS = /*#__PURE__*/React.memo(props => {
|
|
11
11
|
const {
|
|
12
12
|
includeLocalParticipantVideo,
|
|
13
|
+
mirror: mirrorOverride,
|
|
13
14
|
onPiPChange
|
|
14
15
|
} = props;
|
|
15
16
|
const call = useCall();
|
|
16
17
|
const {
|
|
17
|
-
useParticipants
|
|
18
|
+
useParticipants,
|
|
19
|
+
useCameraState
|
|
18
20
|
} = useCallStateHooks();
|
|
19
21
|
const _allParticipants = useParticipants({
|
|
20
22
|
sortBy: speakerLayoutSortPreset
|
|
21
23
|
});
|
|
24
|
+
const {
|
|
25
|
+
direction
|
|
26
|
+
} = useCameraState();
|
|
22
27
|
const allParticipants = useDebouncedValue(_allParticipants, 300); // we debounce the participants to avoid unnecessary rerenders that happen when participant tracks are all subscribed simultaneously
|
|
23
28
|
|
|
24
29
|
const [dominantSpeaker, dominantSpeaker2] = allParticipants.filter(participant => includeLocalParticipantVideo ? true : !participant.isLocalParticipant);
|
|
@@ -74,6 +79,7 @@ export const RTCViewPipIOS = /*#__PURE__*/React.memo(props => {
|
|
|
74
79
|
} = participantInSpotlight || {};
|
|
75
80
|
const isScreenSharing = participantInSpotlight ? hasScreenShare(participantInSpotlight) : false;
|
|
76
81
|
const videoStreamToRender = isScreenSharing ? screenShareStream : videoStream;
|
|
82
|
+
const mirror = isScreenSharing ? false : mirrorOverride !== undefined ? mirrorOverride : !!participantInSpotlight?.isLocalParticipant && direction === 'front';
|
|
77
83
|
const streamURL = useMemo(() => {
|
|
78
84
|
if (!videoStreamToRender) {
|
|
79
85
|
return undefined;
|
|
@@ -86,6 +92,7 @@ export const RTCViewPipIOS = /*#__PURE__*/React.memo(props => {
|
|
|
86
92
|
};
|
|
87
93
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RTCViewPipNative, {
|
|
88
94
|
streamURL: streamURL,
|
|
95
|
+
mirror: mirror,
|
|
89
96
|
ref: nativeRef,
|
|
90
97
|
onPiPChange: handlePiPChange
|
|
91
98
|
}), participantInSpotlight && /*#__PURE__*/React.createElement(DimensionsUpdatedRenderless, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CallingState","hasScreenShare","speakerLayoutSortPreset","videoLoggerSystem","useCall","useCallStateHooks","React","useEffect","useMemo","useCallback","findNodeHandle","onNativeCallClosed","onNativeDimensionsUpdated","RTCViewPipNative","useDebouncedValue","shouldDisableIOSLocalVideoOnBackgroundRef","useTrackDimensions","isInPiPMode$","RTCViewPipIOS","memo","props","includeLocalParticipantVideo","onPiPChange","call","useParticipants","_allParticipants","sortBy","allParticipants","dominantSpeaker","dominantSpeaker2","filter","participant","isLocalParticipant","participantInSpotlight","current","nativeRef","useRef","callClosedInvokedOnce","onCallClosed","node","unsubFunc","on","getLogger","debug","subscription","state","callingState$","subscribe","LEFT","unsubscribe","onDimensionsUpdated","width","height","videoStream","screenShareStream","isScreenSharing","videoStreamToRender","
|
|
1
|
+
{"version":3,"names":["CallingState","hasScreenShare","speakerLayoutSortPreset","videoLoggerSystem","useCall","useCallStateHooks","React","useEffect","useMemo","useCallback","findNodeHandle","onNativeCallClosed","onNativeDimensionsUpdated","RTCViewPipNative","useDebouncedValue","shouldDisableIOSLocalVideoOnBackgroundRef","useTrackDimensions","isInPiPMode$","RTCViewPipIOS","memo","props","includeLocalParticipantVideo","mirror","mirrorOverride","onPiPChange","call","useParticipants","useCameraState","_allParticipants","sortBy","direction","allParticipants","dominantSpeaker","dominantSpeaker2","filter","participant","isLocalParticipant","participantInSpotlight","current","nativeRef","useRef","callClosedInvokedOnce","onCallClosed","node","unsubFunc","on","getLogger","debug","subscription","state","callingState$","subscribe","LEFT","unsubscribe","onDimensionsUpdated","width","height","videoStream","screenShareStream","isScreenSharing","videoStreamToRender","undefined","streamURL","toURL","handlePiPChange","event","next","nativeEvent","active","createElement","Fragment","ref","DimensionsUpdatedRenderless","trackType","key","displayName"],"sourceRoot":"../../../../../src","sources":["components/Call/CallContent/RTCViewPipIOS.tsx"],"mappings":"AAAA,SACEA,YAAY,EACZC,cAAc,EACdC,uBAAuB,EAEvBC,iBAAiB,QAEZ,yBAAyB;AAChC,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,iCAAiC;AAE5E,OAAOC,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AAC9D,SAASC,cAAc,QAAQ,cAAc;AAC7C,SACEC,kBAAkB,EAClBC,yBAAyB,EACzBC,gBAAgB,QACX,oBAAoB;AAC3B,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,yCAAyC,QAAQ,gEAAgE;AAC1H,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,YAAY,QAAQ,oCAAoC;AAejE,OAAO,MAAMC,aAAa,gBAAGZ,KAAK,CAACa,IAAI,CAAEC,KAAY,IAAK;EACxD,MAAM;IACJC,4BAA4B;IAC5BC,MAAM,EAAEC,cAAc;IACtBC;EACF,CAAC,GAAGJ,KAAK;EACT,MAAMK,IAAI,GAAGrB,OAAO,CAAC,CAAC;EACtB,MAAM;IAAEsB,eAAe;IAAEC;EAAe,CAAC,GAAGtB,iBAAiB,CAAC,CAAC;EAC/D,MAAMuB,gBAAgB,GAAGF,eAAe,CAAC;IACvCG,MAAM,EAAE3B;EACV,CAAC,CAAC;EACF,MAAM;IAAE4B;EAAU,CAAC,GAAGH,cAAc,CAAC,CAAC;EACtC,MAAMI,eAAe,GAAGjB,iBAAiB,CA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streamURL: props.streamURL
|
|
32
32
|
// eslint-disable-next-line react/prop-types
|
|
33
33
|
,
|
|
34
|
+
mirror: props.mirror
|
|
35
|
+
// eslint-disable-next-line react/prop-types
|
|
36
|
+
,
|
|
34
37
|
onPiPChange: props.onPiPChange
|
|
35
38
|
// @ts-expect-error - types issue
|
|
36
39
|
,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","requireNativeComponent","StyleSheet","UIManager","videoLoggerSystem","COMPONENT_NAME","NativeComponent","onNativeCallClosed","reactTag","getLogger","debug","commandId","getViewManagerConfig","Commands","onCallClosed","dispatchViewManagerCommand","onNativeDimensionsUpdated","width","height","setPreferredContentSize","RTCViewPipNative","memo","forwardRef","props","ref","OS","createElement","style","absoluteFill","pointerEvents","streamURL","onPiPChange"],"sourceRoot":"../../../../../src","sources":["components/Call/CallContent/RTCViewPipNative.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAEEC,QAAQ,EACRC,sBAAsB,EACtBC,UAAU,EACVC,SAAS,QACJ,cAAc;AACrB,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,MAAMC,cAAc,GAAG,YAAY;
|
|
1
|
+
{"version":3,"names":["React","Platform","requireNativeComponent","StyleSheet","UIManager","videoLoggerSystem","COMPONENT_NAME","NativeComponent","onNativeCallClosed","reactTag","getLogger","debug","commandId","getViewManagerConfig","Commands","onCallClosed","dispatchViewManagerCommand","onNativeDimensionsUpdated","width","height","setPreferredContentSize","RTCViewPipNative","memo","forwardRef","props","ref","OS","createElement","style","absoluteFill","pointerEvents","streamURL","mirror","onPiPChange"],"sourceRoot":"../../../../../src","sources":["components/Call/CallContent/RTCViewPipNative.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAEEC,QAAQ,EACRC,sBAAsB,EACtBC,UAAU,EACVC,SAAS,QACJ,cAAc;AACrB,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,MAAMC,cAAc,G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,EAAET,KAAK,CAACS;IACnB;IAAA;IACAR,GAAG,EAAEA;EAAI,CACV,CAAC;AAEN,CAAC,CACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { CallingState, RxUtils, videoLoggerSystem } from '@stream-io/video-client';
|
|
2
|
+
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
3
|
+
import { NativeModules, Platform } from 'react-native';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import { StreamVideoRN } from '../../utils';
|
|
6
|
+
import { getCallKeepLib } from '../../utils/push/libs';
|
|
7
|
+
import { voipCallkeepAcceptedCallOnNativeDialerMap$, voipCallkeepCallOnForegroundMap$, voipPushNotificationCallCId$ } from '../../utils/push/internal/rxSubjects';
|
|
8
|
+
const isNonActiveCallingState = callingState => {
|
|
9
|
+
return callingState === CallingState.IDLE || callingState === CallingState.UNKNOWN || callingState === CallingState.LEFT;
|
|
10
|
+
};
|
|
11
|
+
const isAcceptedCallingState = callingState => {
|
|
12
|
+
return callingState === CallingState.JOINING || callingState === CallingState.JOINED;
|
|
13
|
+
};
|
|
14
|
+
const unsubscribeCallkeepEvents = async activeCallCid => {
|
|
15
|
+
const voipPushNotificationCallCId = RxUtils.getCurrentValue(voipPushNotificationCallCId$);
|
|
16
|
+
if (activeCallCid && activeCallCid === voipPushNotificationCallCId) {
|
|
17
|
+
// callkeep events should not be listened anymore so clear the call cid
|
|
18
|
+
voipPushNotificationCallCId$.next(undefined);
|
|
19
|
+
}
|
|
20
|
+
return await NativeModules.StreamVideoReactNative?.removeIncomingCall(activeCallCid);
|
|
21
|
+
};
|
|
22
|
+
const logger = videoLoggerSystem.getLogger('useIosCallkeepWithCallingStateEffect');
|
|
23
|
+
const log = message => {
|
|
24
|
+
logger.warn(message);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This hook is used to inform the callkeep library that the call has been joined or ended.
|
|
29
|
+
*/
|
|
30
|
+
export const useIosCallkeepWithCallingStateEffect = () => {
|
|
31
|
+
const activeCall = useCall();
|
|
32
|
+
const {
|
|
33
|
+
useCallCallingState
|
|
34
|
+
} = useCallStateHooks();
|
|
35
|
+
const callingState = useCallCallingState();
|
|
36
|
+
const [acceptedForegroundCallkeepMap, setAcceptedForegroundCallkeepMap] = useState();
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
return () => {
|
|
39
|
+
const pushConfig = StreamVideoRN.getConfig().push;
|
|
40
|
+
if (Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios?.pushProviderName) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
44
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const callkeep = getCallKeepLib();
|
|
48
|
+
// if the component is unmounted and the callID was not reported to callkeep, then report it now
|
|
49
|
+
if (acceptedForegroundCallkeepMap) {
|
|
50
|
+
log(`Ending call in callkeep: ${acceptedForegroundCallkeepMap.cid}, reason: component unmounted and call was present in acceptedForegroundCallkeepMap`);
|
|
51
|
+
unsubscribeCallkeepEvents(acceptedForegroundCallkeepMap.cid).then(() => callkeep.endCall(acceptedForegroundCallkeepMap.uuid));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, [acceptedForegroundCallkeepMap]);
|
|
55
|
+
const activeCallCid = activeCall?.cid;
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
return () => {
|
|
58
|
+
const pushConfig = StreamVideoRN.getConfig().push;
|
|
59
|
+
if (Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios?.pushProviderName || !activeCallCid) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
63
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(voipCallkeepAcceptedCallOnNativeDialerMap$);
|
|
67
|
+
const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(voipCallkeepCallOnForegroundMap$);
|
|
68
|
+
const callkeep = getCallKeepLib();
|
|
69
|
+
if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
|
|
70
|
+
log(`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in nativeDialerAcceptedCallMap`);
|
|
71
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(nativeDialerAcceptedCallMap.uuid));
|
|
72
|
+
// no need to keep this reference anymore
|
|
73
|
+
voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
|
|
74
|
+
} else if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
|
|
75
|
+
log(`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in foregroundIncomingCallkeepMap`);
|
|
76
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(foregroundIncomingCallkeepMap.uuid));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}, [activeCallCid]);
|
|
80
|
+
const pushConfig = StreamVideoRN.getConfig().push;
|
|
81
|
+
if (Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios.pushProviderName || !activeCallCid) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
85
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Check if current call is still needed to be accepted in callkeep
|
|
91
|
+
*/
|
|
92
|
+
if (isAcceptedCallingState(callingState) && acceptedForegroundCallkeepMap?.cid !== activeCallCid) {
|
|
93
|
+
const callkeep = getCallKeepLib();
|
|
94
|
+
// push notification was displayed
|
|
95
|
+
// but the call has been accepted through the app and not through the native dialer
|
|
96
|
+
const foregroundCallkeepMap = RxUtils.getCurrentValue(voipCallkeepCallOnForegroundMap$);
|
|
97
|
+
if (foregroundCallkeepMap && foregroundCallkeepMap.cid === activeCallCid) {
|
|
98
|
+
log(
|
|
99
|
+
// @ts-expect-error - types issue
|
|
100
|
+
`Accepting call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundCallkeepMap`);
|
|
101
|
+
// no need to keep this reference anymore
|
|
102
|
+
voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
103
|
+
NativeModules.StreamVideoReactNative?.removeIncomingCall(activeCallCid).then(() => callkeep.answerIncomingCall(foregroundCallkeepMap.uuid));
|
|
104
|
+
// this call should be accepted in callkeep
|
|
105
|
+
setAcceptedForegroundCallkeepMap(foregroundCallkeepMap);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Check if current call is still needed to be ended in callkeep
|
|
111
|
+
*/
|
|
112
|
+
if (isNonActiveCallingState(callingState)) {
|
|
113
|
+
const callkeep = getCallKeepLib();
|
|
114
|
+
|
|
115
|
+
// this was a previously joined call which had push notification displayed
|
|
116
|
+
// the call was accepted through the app and not through native dialer
|
|
117
|
+
// the call was left using the leave button in the app and not through native dialer
|
|
118
|
+
if (activeCallCid === acceptedForegroundCallkeepMap?.cid) {
|
|
119
|
+
log(
|
|
120
|
+
// @ts-expect-error - types issue
|
|
121
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in acceptedForegroundCallkeepMap`);
|
|
122
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(acceptedForegroundCallkeepMap.uuid));
|
|
123
|
+
setAcceptedForegroundCallkeepMap(undefined);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
// this was a call which had push notification displayed but never joined
|
|
127
|
+
// the user rejected in the app and not from native dialer
|
|
128
|
+
const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(voipCallkeepCallOnForegroundMap$);
|
|
129
|
+
if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
|
|
130
|
+
log(
|
|
131
|
+
// @ts-expect-error - types issue
|
|
132
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundIncomingCallkeepMap`);
|
|
133
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(foregroundIncomingCallkeepMap.uuid));
|
|
134
|
+
// no need to keep this reference anymore
|
|
135
|
+
voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
// this was a previously joined call
|
|
139
|
+
// it was an accepted call from native dialer and not from the app
|
|
140
|
+
// the user left using the leave button in the app
|
|
141
|
+
const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(voipCallkeepAcceptedCallOnNativeDialerMap$);
|
|
142
|
+
if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
|
|
143
|
+
log(
|
|
144
|
+
// @ts-expect-error - types issue
|
|
145
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in nativeDialerAcceptedCallMap`);
|
|
146
|
+
unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(nativeDialerAcceptedCallMap.uuid));
|
|
147
|
+
// no need to keep this reference anymore
|
|
148
|
+
voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=useIosCallkeepWithCallingStateEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CallingState","RxUtils","videoLoggerSystem","useCall","useCallStateHooks","NativeModules","Platform","useEffect","useState","StreamVideoRN","getCallKeepLib","voipCallkeepAcceptedCallOnNativeDialerMap$","voipCallkeepCallOnForegroundMap$","voipPushNotificationCallCId$","isNonActiveCallingState","callingState","IDLE","UNKNOWN","LEFT","isAcceptedCallingState","JOINING","JOINED","unsubscribeCallkeepEvents","activeCallCid","voipPushNotificationCallCId","getCurrentValue","next","undefined","StreamVideoReactNative","removeIncomingCall","logger","getLogger","log","message","warn","useIosCallkeepWithCallingStateEffect","activeCall","useCallCallingState","acceptedForegroundCallkeepMap","setAcceptedForegroundCallkeepMap","pushConfig","getConfig","push","OS","ios","pushProviderName","android","incomingCallChannel","callkeep","cid","then","endCall","uuid","nativeDialerAcceptedCallMap","foregroundIncomingCallkeepMap","foregroundCallkeepMap","answerIncomingCall"],"sourceRoot":"../../../../src","sources":["hooks/push/useIosCallkeepWithCallingStateEffect.ts"],"mappings":"AAAA,SACEA,YAAY,EACZC,OAAO,EACPC,iBAAiB,QACZ,yBAAyB;AAChC,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,iCAAiC;AAC5E,SAASC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SACEC,0CAA0C,EAC1CC,gCAAgC,EAChCC,4BAA4B,QACvB,sCAAsC;AAE7C,MAAMC,uBAAuB,GAAIC,YAA0B,IAAK;EAC9D,OACEA,YAAY,KAAKf,YAAY,CAACgB,IAAI,IAClCD,YAAY,KAAKf,YAAY,CAACiB,OAAO,IACrCF,YAAY,KAAKf,YAAY,CAACkB,IAAI;AAEtC,CAAC;AAED,MAAMC,sBAAsB,GAAIJ,YAA0B,IAAK;EAC7D,OACEA,YAAY,KAAKf,YAAY,CAACoB,OAAO,IACrCL,YAAY,KAAKf,YAAY,CAACqB,MAAM;AAExC,CAAC;AAED,MAAMC,yBAAyB,GAAG,MAAOC,aAAiC,IAAK;EAC7E,MAAMC,2BAA2B,GAAGvB,OAAO,CAACwB,eAAe,CACzDZ,4BACF,CAAC;EACD,IAAIU,aAAa,IAAIA,aAAa,KAAKC,2BAA2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rD,CAAC;MACDb,gCAAgC,CAACZ,SAAS,CAAC;MAC3C;IACF;IACA;IACA;IACA,MAAM2B,6BAA6B,GAAGrD,OAAO,CAACwB,eAAe,CAC3Db,gCACF,CAAC;IACD,IAAIW,aAAa,KAAK+B,6BAA6B,EAAEL,GAAG,EAAE;MACxDjB,GAAG;MACD;MACA,4BAA4BT,aAAa,kCAAkCvB,YAAY,CAACe,YAAY,CAAC,wDACvG,CAAC;MACDO,yBAAyB,CAACC,aAAa,CAAC,CAAC2B,IAAI,CAAC,MAC5CF,QAAQ,CAACG,OAAO,CAACG,6BAA6B,CAACF,IAAI,CACrD,CAAC;MACD;MACAxC,gCAAgC,CAACc,IAAI,CAACC,SAAS,CAAC;MAChD;IACF;IACA;IACA;IACA;IACA,MAAM0B,2BAA2B,GAAGpD,OAAO,CAACwB,eAAe,CACzDd,0CACF,CAAC;IACD,IAAIY,aAAa,KAAK8B,2BAA2B,EAAEJ,GAAG,EAAE;MACtDjB,GAAG;MACD;MACA,4BAA4BT,aAAa,kCAAkCvB,YAAY,CAACe,YAAY,CAAC,sDACvG,CAAC;MACDO,yBAAyB,CAACC,aAAa,CAAC,CAAC2B,IAAI,CAAC,MAC5CF,QAAQ,CAACG,OAAO,CAACE,2BAA2B,CAACD,IAAI,CACnD,CAAC;MACD;MACAzC,0CAA0C,CAACe,IAAI,CAACC,SAAS,CAAC;MAC1D;IACF;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { getVoipPushNotificationLib } from '../../utils/push/libs';
|
|
2
3
|
import { Platform } from 'react-native';
|
|
3
4
|
import { StreamVideoRN } from '../../utils';
|
|
4
5
|
import { onVoipNotificationReceived } from '../../utils/push/internal/ios';
|
|
5
6
|
import { useConnectedUser, useStreamVideoClient } from '@stream-io/video-react-bindings';
|
|
6
7
|
import { setPushLogoutCallback } from '../../utils/internal/pushLogoutCallback';
|
|
7
8
|
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
8
|
-
import { getCallingxLibIfAvailable } from '../../utils/push/libs';
|
|
9
9
|
const logger = videoLoggerSystem.getLogger('useIosVoipPushEventsSetupEffect');
|
|
10
10
|
|
|
11
11
|
/* VoipPushNotificationLib has support for only one listener type at a time
|
|
@@ -23,7 +23,6 @@ function setLogoutCallback(client, token, lastVoipTokenRef) {
|
|
|
23
23
|
};
|
|
24
24
|
try {
|
|
25
25
|
await client.removeDevice(token);
|
|
26
|
-
logger.debug('PushLogoutCallback - Removed voip token', token);
|
|
27
26
|
} catch (err) {
|
|
28
27
|
logger.warn('PushLogoutCallback - Failed to remove voip token', err);
|
|
29
28
|
}
|
|
@@ -78,10 +77,20 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
78
77
|
useEffect(() => {
|
|
79
78
|
const pushConfig = StreamVideoRN.getConfig().push;
|
|
80
79
|
const pushProviderName = pushConfig?.ios.pushProviderName;
|
|
81
|
-
|
|
82
|
-
if (Platform.OS !== 'ios' || !client || !pushProviderName || !callingx) {
|
|
80
|
+
if (Platform.OS !== 'ios' || !client || !pushProviderName) {
|
|
83
81
|
return;
|
|
84
82
|
}
|
|
83
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
84
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
85
|
+
logger.debug('android incomingCallChannel is not defined, so skipping the useIosVoipPushEventsSetupEffect');
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const voipPushNotification = getVoipPushNotificationLib();
|
|
89
|
+
|
|
90
|
+
// even though we do this natively, we have to still register here again
|
|
91
|
+
// natively this will make sure "register" event for JS is sent with the last push token
|
|
92
|
+
// Necessary if client changed before we got the event here or user logged out and logged in again
|
|
93
|
+
voipPushNotification.registerVoipToken();
|
|
85
94
|
const onTokenReceived = token => {
|
|
86
95
|
const userId = client.streamClient._user?.id ?? '';
|
|
87
96
|
if (client.streamClient.anonymous || !token || !userId) {
|
|
@@ -109,24 +118,27 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
109
118
|
});
|
|
110
119
|
};
|
|
111
120
|
// fired when PushKit give us the latest token
|
|
112
|
-
|
|
113
|
-
token
|
|
114
|
-
}) => {
|
|
121
|
+
voipPushNotification.addEventListener('register', token => {
|
|
115
122
|
onTokenReceived(token);
|
|
116
123
|
});
|
|
117
124
|
|
|
118
|
-
// this will
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
// this will fire when there are events occured before js bridge initialized
|
|
126
|
+
voipPushNotification.addEventListener('didLoadWithEvents', events => {
|
|
127
|
+
if (!events || !Array.isArray(events) || events.length < 1) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
for (const voipPushEvent of events) {
|
|
131
|
+
const {
|
|
132
|
+
name,
|
|
133
|
+
data
|
|
134
|
+
} = voipPushEvent;
|
|
135
|
+
if (name === 'RNVoipPushRemoteNotificationsRegisteredEvent') {
|
|
136
|
+
onTokenReceived(data);
|
|
137
|
+
} else if (name === 'RNVoipPushRemoteNotificationReceivedEvent') {
|
|
138
|
+
onVoipNotificationReceived(data, pushConfig);
|
|
139
|
+
}
|
|
127
140
|
}
|
|
128
141
|
});
|
|
129
|
-
callingx.registerVoipToken();
|
|
130
142
|
lastListener.count += 1;
|
|
131
143
|
const currentListenerCount = lastListener.count;
|
|
132
144
|
return () => {
|
|
@@ -136,7 +148,8 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
136
148
|
return;
|
|
137
149
|
}
|
|
138
150
|
logger.debug(`Voip event listeners are removed for user: ${userId}`);
|
|
139
|
-
|
|
151
|
+
voipPushNotification.removeEventListener('didLoadWithEvents');
|
|
152
|
+
voipPushNotification.removeEventListener('register');
|
|
140
153
|
};
|
|
141
154
|
}, [client]);
|
|
142
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","useState","Platform","StreamVideoRN","onVoipNotificationReceived","useConnectedUser","useStreamVideoClient","setPushLogoutCallback","videoLoggerSystem","
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","useState","getVoipPushNotificationLib","Platform","StreamVideoRN","onVoipNotificationReceived","useConnectedUser","useStreamVideoClient","setPushLogoutCallback","videoLoggerSystem","logger","getLogger","lastListener","count","setLogoutCallback","client","token","lastVoipTokenRef","current","userId","removeDevice","err","warn","useIosVoipPushEventsSetupEffect","connectedUserId","id","unsentToken","setUnsentToken","pushProviderName","getConfig","push","ios","tokenToSend","debug","addVoipDevice","then","undefined","catch","error","pushConfig","OS","android","incomingCallChannel","voipPushNotification","registerVoipToken","onTokenReceived","streamClient","_user","anonymous","reason","lastVoipToken","addEventListener","events","Array","isArray","length","voipPushEvent","name","data","currentListenerCount","removeEventListener"],"sourceRoot":"../../../../src","sources":["hooks/push/useIosVoipPushEventsSetupEffect.ts"],"mappings":"AAAA,SAAgCA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1E,SAASC,0BAA0B,QAAQ,uBAAuB;AAElE,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,0BAA0B,QAAQ,+BAA+B;AAC1E,SACEC,gBAAgB,EAChBC,oBAAoB,QACf,iCAAiC;AACxC,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAA4BC,iBAAiB,QAAQ,yBAAyB;AAE9E,MAAMC,MAAM,GAAGD,iBAAiB,CAACE,SAAS,CAAC,iCAAiC,CAAC;;AAE7E;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG;EAAEC,KAAK,EAAE;AAAE,CAAC;AAEjC,SAASC,iBAAiBA,CACxBC,MAAyB,EACzBC,KAAa,EACbC,gBAAqE,EACrE;EACAT,qBAAqB,CAAC,YAAY;IAChCS,gBAAgB,CAACC,OAAO,GAAG;MAAEF,KAAK,EAAE,EAAE;MAAEG,MAA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