@stream-io/video-react-native-sdk 1.44.0 → 1.45.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 +35 -3
- package/android/src/main/java/com/streamvideo/reactnative/audio/AudioDeviceManager.kt +110 -58
- package/android/src/main/java/com/streamvideo/reactnative/audio/CommunicationModeKeepAlive.kt +247 -0
- package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +16 -5
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +112 -26
- package/android/src/main/java/com/streamvideo/reactnative/util/CallAlivePermissionsHelper.kt +68 -37
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +12 -6
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -1
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +38 -11
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/hooks/useLoopbackRecording.js +10 -127
- package/dist/commonjs/hooks/useLoopbackRecording.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +25 -0
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +38 -56
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +43 -4
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +7 -167
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/android.js +204 -0
- package/dist/commonjs/utils/push/internal/android.js.map +1 -0
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js +9 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
- package/dist/commonjs/utils/push/setupAndroidPushEvents.js +25 -0
- package/dist/commonjs/utils/push/setupAndroidPushEvents.js.map +1 -0
- package/dist/commonjs/utils/push/setupCallingExpEvents.js +6 -2
- package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +1 -1
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +6 -7
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/commonjs/utils/push/utils.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +12 -6
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +39 -12
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/hooks/useLoopbackRecording.js +10 -127
- package/dist/module/hooks/useLoopbackRecording.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +25 -0
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/callingx/callingx.js +38 -56
- package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/module/utils/keepCallAliveHeadlessTask.js +41 -3
- package/dist/module/utils/keepCallAliveHeadlessTask.js.map +1 -1
- package/dist/module/utils/push/android.js +9 -169
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/android.js +200 -0
- package/dist/module/utils/push/internal/android.js.map +1 -0
- package/dist/module/utils/push/libs/firebaseMessaging/index.js +9 -1
- package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/lib.js +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
- package/dist/module/utils/push/setupAndroidPushEvents.js +21 -0
- package/dist/module/utils/push/setupAndroidPushEvents.js.map +1 -0
- package/dist/module/utils/push/setupCallingExpEvents.js +6 -2
- package/dist/module/utils/push/setupCallingExpEvents.js.map +1 -1
- package/dist/module/utils/push/setupIosVoipPushEvents.js +6 -7
- package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/module/utils/push/utils.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/useLoopbackRecording.d.ts +12 -69
- package/dist/typescript/hooks/useLoopbackRecording.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +13 -0
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +1 -2
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +9 -0
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts +3 -4
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/android.d.ts +8 -0
- package/dist/typescript/utils/push/internal/android.d.ts.map +1 -0
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +6 -4
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/lib.d.ts +2 -2
- package/dist/typescript/utils/push/libs/firebaseMessaging/lib.d.ts.map +1 -1
- package/dist/typescript/utils/push/setupAndroidPushEvents.d.ts +3 -0
- package/dist/typescript/utils/push/setupAndroidPushEvents.d.ts.map +1 -0
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +1 -1
- package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
- package/dist/typescript/utils/push/utils.d.ts +2 -2
- package/dist/typescript/utils/push/utils.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/expo-config-plugin/dist/withAndroidPermissions.js +1 -1
- package/ios/TracksRecorder/RecorderVideoSink.swift +92 -5
- package/package.json +4 -4
- package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +25 -11
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +59 -21
- package/src/hooks/useLoopbackRecording.ts +36 -248
- package/src/modules/call-manager/native-module.d.ts +14 -0
- package/src/utils/StreamVideoRN/index.ts +29 -0
- package/src/utils/StreamVideoRN/types.ts +1 -2
- package/src/utils/internal/callingx/callingx.ts +49 -68
- package/src/utils/keepCallAliveHeadlessTask.ts +45 -3
- package/src/utils/push/android.ts +12 -237
- package/src/utils/push/internal/android.ts +273 -0
- package/src/utils/push/libs/firebaseMessaging/index.ts +16 -5
- package/src/utils/push/libs/firebaseMessaging/lib.ts +3 -3
- package/src/utils/push/setupAndroidPushEvents.ts +25 -0
- package/src/utils/push/setupCallingExpEvents.ts +6 -3
- package/src/utils/push/setupIosVoipPushEvents.ts +8 -7
- package/src/utils/push/utils.ts +2 -4
- package/src/version.ts +1 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { CallingState } from '@stream-io/video-client';
|
|
4
|
+
import { AppState, Platform } from 'react-native';
|
|
5
|
+
import { getCallingxLib, getCallingxLibIfAvailable } from '../libs';
|
|
6
|
+
import { StreamVideoRN } from '../../StreamVideoRN';
|
|
7
|
+
import { pushUnsubscriptionCallbacks } from './constants';
|
|
8
|
+
import { canListenToWS, shouldCallBeClosed } from './utils';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Handles a Stream Video `call.ring` push payload: connects the WS to watch the ringing call
|
|
12
|
+
* and auto-dismisses it if it has already ended/been handled elsewhere. Non-ringing types are
|
|
13
|
+
* ignored (their display is app responsibility). Android-only; a no-op on other platforms.
|
|
14
|
+
*/
|
|
15
|
+
export const onRingNotificationReceived = async data => {
|
|
16
|
+
/* Example data from firebase
|
|
17
|
+
"message": {
|
|
18
|
+
"data": {
|
|
19
|
+
call_cid: 'audio_room:dcc1638c-e90d-4dcb-bf3b-8fa7767bfbb0',
|
|
20
|
+
call_display_name: '',
|
|
21
|
+
created_by_display_name: 'tommaso',
|
|
22
|
+
created_by_id: 'tommaso-03dcddb7-e9e2-42ec-b2f3-5043aac666ee',
|
|
23
|
+
receiver_id: 'martin-21824f17-319b-401b-a61b-fcab646f0d3f',
|
|
24
|
+
sender: 'stream.video',
|
|
25
|
+
type: 'call.live_started',
|
|
26
|
+
version: 'v2'
|
|
27
|
+
},
|
|
28
|
+
// other stuff
|
|
29
|
+
}
|
|
30
|
+
*/
|
|
31
|
+
if (Platform.OS !== 'android') return;
|
|
32
|
+
const nativeLog = (message, level = 'debug') => getCallingxLibIfAvailable()?.log(`[callingx - onRingNotificationReceived]: ${message}`, level);
|
|
33
|
+
const pushConfig = StreamVideoRN.getConfig().push;
|
|
34
|
+
if (!pushConfig || !data || data.sender !== 'stream.video' || data.type !== 'call.ring') {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const call_cid = data.call_cid;
|
|
38
|
+
const callingx = getCallingxLib();
|
|
39
|
+
if (pushUnsubscriptionCallbacks.has(call_cid)) {
|
|
40
|
+
nativeLog(`call_cid ${call_cid} is already being watched, skipping the duplicate call.ring notification`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const asForegroundService = canListenToWS();
|
|
44
|
+
const backgroundTaskOwner = `push:${call_cid}`;
|
|
45
|
+
nativeLog(`call.ring for callCid: ${call_cid} asForegroundService=${asForegroundService}`);
|
|
46
|
+
const finishBackgroundTask = () => {
|
|
47
|
+
nativeLog(`Finishing background task for callCid: ${call_cid}`);
|
|
48
|
+
callingx.releaseBackgroundTask(backgroundTaskOwner);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Gives up on this push: dismisses the call the native push path already displayed, then asks
|
|
53
|
+
* the call service to stop. `stopService` is only a request — it no-ops while any other call is
|
|
54
|
+
* registered or being registered — so this call must be ended explicitly rather than relying on
|
|
55
|
+
* the service teardown to wipe it.
|
|
56
|
+
*/
|
|
57
|
+
const abandonPush = async () => {
|
|
58
|
+
if (asForegroundService) {
|
|
59
|
+
finishBackgroundTask();
|
|
60
|
+
}
|
|
61
|
+
// Each step is contained on its own: failing to dismiss the call must not skip the stop
|
|
62
|
+
// request, and neither may skip the unsubscription cleanup — a stale entry makes every later
|
|
63
|
+
// push for this cid look like a duplicate and get discarded.
|
|
64
|
+
try {
|
|
65
|
+
await callingx.endCallWithReason(call_cid, 'error');
|
|
66
|
+
} catch (error) {
|
|
67
|
+
nativeLog(`Failed to end call ${call_cid}: ${error}`, 'error');
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
await callingx.stopService();
|
|
71
|
+
} catch (error) {
|
|
72
|
+
nativeLog(`Failed to stop the call service for ${call_cid}: ${error}`, 'error');
|
|
73
|
+
}
|
|
74
|
+
pushUnsubscriptionCallbacks.delete(call_cid);
|
|
75
|
+
};
|
|
76
|
+
if (asForegroundService) {
|
|
77
|
+
// initialize the callback array immediately to avoid race condition
|
|
78
|
+
pushUnsubscriptionCallbacks.set(call_cid, []);
|
|
79
|
+
// The owner is added synchronously inside acquireBackgroundTask (before its own await), so it
|
|
80
|
+
// is registered immediately even though we don't await the returned promise here.
|
|
81
|
+
nativeLog(`acquiring background task for callCid: ${call_cid}`);
|
|
82
|
+
callingx.acquireBackgroundTask(backgroundTaskOwner).catch(e => {
|
|
83
|
+
nativeLog(`Failed to acquire background task for callCid: ${call_cid} error: ${e}`, 'error');
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
let client;
|
|
87
|
+
try {
|
|
88
|
+
client = await pushConfig.createStreamVideoClient();
|
|
89
|
+
if (!client) {
|
|
90
|
+
nativeLog(`video client not found, skipping the call.ring notification`);
|
|
91
|
+
await abandonPush();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
} catch (error) {
|
|
95
|
+
//we need to release the background task and stop the service to avoid stale owner
|
|
96
|
+
nativeLog(`Failed to create video client: ${error}`, 'error');
|
|
97
|
+
await abandonPush();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (asForegroundService) {
|
|
101
|
+
// Listen to call events from WS with the keep-alive headless task, bound to the call service.
|
|
102
|
+
(async () => {
|
|
103
|
+
try {
|
|
104
|
+
nativeLog(`onRingingCall (fg service) for callCid: ${call_cid}`);
|
|
105
|
+
const callFromPush = await client.onRingingCall(call_cid);
|
|
106
|
+
const {
|
|
107
|
+
mustEndCall,
|
|
108
|
+
endCallReason
|
|
109
|
+
} = shouldCallBeClosed(callFromPush, data);
|
|
110
|
+
if (mustEndCall) {
|
|
111
|
+
nativeLog(`Closing fg service callCid: ${call_cid} endCallReason: ${endCallReason}`);
|
|
112
|
+
callingx.endCallWithReason(call_cid, endCallReason);
|
|
113
|
+
callFromPush.leave({
|
|
114
|
+
reject: false
|
|
115
|
+
}).catch(error => {
|
|
116
|
+
nativeLog(`Failed to leave already-ended ringing call ${call_cid}: ${error}`, 'error');
|
|
117
|
+
});
|
|
118
|
+
finishBackgroundTask();
|
|
119
|
+
pushUnsubscriptionCallbacks.delete(call_cid);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// prevent subscriptions in case of call being left and subscriptions being already cleared
|
|
124
|
+
const unsubscribeFunctions = pushUnsubscriptionCallbacks.get(call_cid);
|
|
125
|
+
if (!unsubscribeFunctions) {
|
|
126
|
+
nativeLog(`ring cancelled during onRingingCall for callCid: ${call_cid}, releasing background task`);
|
|
127
|
+
finishBackgroundTask();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
nativeLog(`watching WS for ringing callCid: ${call_cid}`);
|
|
131
|
+
// check if service needs to be closed if accept/decline event was done on another device
|
|
132
|
+
const unsubscribe = callFromPush.on('all', event => {
|
|
133
|
+
const _canListenToWS = canListenToWS();
|
|
134
|
+
if (!_canListenToWS) {
|
|
135
|
+
nativeLog(`Closing fg service from event ${event.type} callCid: ${call_cid} canListenToWS: ${_canListenToWS}`);
|
|
136
|
+
unsubscribeFunctions.forEach(fn => fn());
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const {
|
|
140
|
+
mustEndCall: mustEndCallFromEvent,
|
|
141
|
+
endCallReason: endCallReasonFromEvent
|
|
142
|
+
} = shouldCallBeClosed(callFromPush, data);
|
|
143
|
+
if (mustEndCallFromEvent) {
|
|
144
|
+
nativeLog(`Closing fg service from event ${event.type} callCid: ${call_cid} shouldCallBeClosed`);
|
|
145
|
+
callingx.endCallWithReason(call_cid, endCallReasonFromEvent);
|
|
146
|
+
unsubscribeFunctions.forEach(fn => fn());
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// check if service needs to be closed if call was left
|
|
151
|
+
const stateSubscription = callFromPush.state.callingState$.subscribe(callingState => {
|
|
152
|
+
if (callingState === CallingState.IDLE || callingState === CallingState.LEFT) {
|
|
153
|
+
nativeLog(`Closing fg service from callingState callCid: ${call_cid} callingState: ${callingState}`);
|
|
154
|
+
unsubscribeFunctions.forEach(fn => fn());
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
//stop background task when app comes to foreground
|
|
159
|
+
const appStateSubscription = AppState.addEventListener('change', nextAppState => {
|
|
160
|
+
const _canListenToWS = canListenToWS();
|
|
161
|
+
nativeLog(`AppState changed to: ${nextAppState} for callCid: ${call_cid} canListenToWS: ${_canListenToWS}`);
|
|
162
|
+
if (!_canListenToWS) {
|
|
163
|
+
unsubscribeFunctions.forEach(fn => fn());
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
unsubscribeFunctions.push(unsubscribe);
|
|
168
|
+
unsubscribeFunctions.push(() => stateSubscription.unsubscribe());
|
|
169
|
+
unsubscribeFunctions.push(() => appStateSubscription.remove());
|
|
170
|
+
unsubscribeFunctions.push(finishBackgroundTask);
|
|
171
|
+
unsubscribeFunctions.push(() => pushUnsubscriptionCallbacks.delete(call_cid));
|
|
172
|
+
nativeLog(`WS subscriptions registered for callCid: ${call_cid}`);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
nativeLog(`Failed to start background task with callCid: ${call_cid} error: ${error}`, 'error');
|
|
175
|
+
pushUnsubscriptionCallbacks.delete(call_cid);
|
|
176
|
+
finishBackgroundTask();
|
|
177
|
+
}
|
|
178
|
+
})();
|
|
179
|
+
}
|
|
180
|
+
if (asForegroundService) {
|
|
181
|
+
// no need to check if call has be closed as that will be handled by the fg service
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
nativeLog(`onRingingCall (foreground) for callCid: ${call_cid}`);
|
|
185
|
+
const callFromPush = await client.onRingingCall(call_cid);
|
|
186
|
+
const {
|
|
187
|
+
mustEndCall,
|
|
188
|
+
endCallReason
|
|
189
|
+
} = shouldCallBeClosed(callFromPush, data);
|
|
190
|
+
if (mustEndCall) {
|
|
191
|
+
nativeLog(`Removing incoming call notification immediately with callCid: ${call_cid} as it should be closed`);
|
|
192
|
+
callingx.endCallWithReason(call_cid, endCallReason);
|
|
193
|
+
callFromPush.leave({
|
|
194
|
+
reject: false
|
|
195
|
+
}).catch(error => {
|
|
196
|
+
nativeLog(`Failed to leave already-ended ringing call ${call_cid}: ${error}`, 'error');
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
//# sourceMappingURL=android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CallingState","AppState","Platform","getCallingxLib","getCallingxLibIfAvailable","StreamVideoRN","pushUnsubscriptionCallbacks","canListenToWS","shouldCallBeClosed","onRingNotificationReceived","data","OS","nativeLog","message","level","log","pushConfig","getConfig","push","sender","type","call_cid","callingx","has","asForegroundService","backgroundTaskOwner","finishBackgroundTask","releaseBackgroundTask","abandonPush","endCallWithReason","error","stopService","delete","set","acquireBackgroundTask","catch","e","client","createStreamVideoClient","callFromPush","onRingingCall","mustEndCall","endCallReason","leave","reject","unsubscribeFunctions","get","unsubscribe","on","event","_canListenToWS","forEach","fn","mustEndCallFromEvent","endCallReasonFromEvent","stateSubscription","state","callingState$","subscribe","callingState","IDLE","LEFT","appStateSubscription","addEventListener","nextAppState","remove"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/android.ts"],"mappings":";;AAAA,SAGEA,YAAY,QAEP,yBAAyB;AAChC,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AACjD,SAEEC,cAAc,EACdC,yBAAyB,QACpB,SAAS;AAChB,SAASC,aAAa,QAAQ,qBAAqB;AACnD,SAASC,2BAA2B,QAAQ,aAAa;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,SAAS;;AAE3D;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAG,MACxCC,IAAmC,IAChC;EACH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIR,QAAQ,CAACS,EAAE,KAAK,SAAS,EAAE;EAE/B,MAAMC,SAAS,GAAGA,CAChBC,OAAe,EACfC,KAA0C,GAAG,OAAO,KAEpDV,yBAAyB,CAAC,CAAC,EAAEW,GAAG,CAC9B,4CAA4CF,OAAO,EAAE,EACrDC,KACF,CAAC;EAEH,MAAME,UAAU,GAAGX,aAAa,CAACY,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IACE,CAACF,UAAU,IACX,CAACN,IAAI,IACLA,IAAI,CAACS,MAAM,KAAK,cAAc,IAC9BT,IAAI,CAACU,IAAI,KAAK,WAAW,EACzB;IACA;EACF;EAEA,MAAMC,QAAQ,GAAGX,IAAI,CAACW,QAAkB;EACxC,MAAMC,QAAQ,GAAGnB,cAAc,CAAC,CAAC;EAEjC,IAAIG,2BAA2B,CAACiB,GAAG,CAACF,QAAQ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E,IAAI+B,WAAW,EAAE;IACf7B,SAAS,CACP,iEAAiES,QAAQ,yBAC3E,CAAC;IACDC,QAAQ,CAACO,iBAAiB,CAACR,QAAQ,EAAEqB,aAAa,CAAC;IACnDH,YAAY,CAACI,KAAK,CAAC;MAAEC,MAAM,EAAE;IAAM,CAAC,CAAC,CAACT,KAAK,CAAEL,KAAK,IAAK;MACrDlB,SAAS,CACP,8CAA8CS,QAAQ,KAAKS,KAAK,EAAE,EAClE,OACF,CAAC;IACH,CAAC,CAAC;EACJ;AACF,CAAC","ignoreList":[]}
|
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import { lib } from './lib';
|
|
4
4
|
const INSTALLATION_INSTRUCTION = 'Please see https://rnfirebase.io/messaging/usage#installation for installation instructions';
|
|
5
|
-
|
|
5
|
+
function getFirebaseMessagingModule() {
|
|
6
6
|
if (!lib) {
|
|
7
7
|
throw Error('@react-native-firebase/messaging is not installed. ' + INSTALLATION_INSTRUCTION);
|
|
8
8
|
}
|
|
9
9
|
return lib;
|
|
10
10
|
}
|
|
11
|
+
export function getFirebaseMessagingLib() {
|
|
12
|
+
const messagingModule = getFirebaseMessagingModule();
|
|
13
|
+
const messaging = messagingModule.getMessaging();
|
|
14
|
+
return () => ({
|
|
15
|
+
getToken: () => messagingModule.getToken(messaging),
|
|
16
|
+
onTokenRefresh: listener => messagingModule.onTokenRefresh(messaging, listener)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
11
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["lib","INSTALLATION_INSTRUCTION","
|
|
1
|
+
{"version":3,"names":["lib","INSTALLATION_INSTRUCTION","getFirebaseMessagingModule","Error","getFirebaseMessagingLib","messagingModule","messaging","getMessaging","getToken","onTokenRefresh","listener"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/firebaseMessaging/index.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA8B,OAAO;AAEjD,MAAMC,wBAAwB,GAC5B,6FAA6F;AAM/F,SAASC,0BAA0BA,CAAA,EAAG;EACpC,IAAI,CAACF,GAAG,EAAE;IACR,MAAMG,KAAK,CACT,qDAAqD,GACnDF,wBACJ,CAAC;EACH;EACA,OAAOD,GAAG;AACZ;AAEA,OAAO,SAASI,uBAAuBA,CAAA,EAAG;EACxC,MAAMC,eAAe,GAAGH,0BAA0B,CAAC,CAAC;EACpD,MAAMI,SAAS,GAAGD,eAAe,CAACE,YAAY,CAAC,CAAC;EAChD,OAAO,OAAO;IACZC,QAAQ,EAAEA,CAAA,KAAMH,eAAe,CAACG,QAAQ,CAACF,SAAS,CAAC;IACnDG,cAAc,EAAGC,QAAiC,IAChDL,eAAe,CAACI,cAAc,CAACH,SAAS,EAAEI,QAAQ;EACtD,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["lib","require"
|
|
1
|
+
{"version":3,"names":["lib","require"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/firebaseMessaging/lib.ts"],"mappings":";;AAEA,IAAIA,GAAgC;AAEpC,IAAI;EACFA,GAAG,GAAGC,OAAO,CAAC,kCAAkC,CAAC;AACnD,CAAC,CAAC,MAAM,CAAC;AAET,SAASD,GAAG;;AAEZ;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
5
|
+
import { getCallingxLib } from './libs';
|
|
6
|
+
import { onRingNotificationReceived } from './internal/android';
|
|
7
|
+
export function setupAndroidPushEvents(pushConfig) {
|
|
8
|
+
const logger = videoLoggerSystem.getLogger('setupAndroidPushEvents');
|
|
9
|
+
if (Platform.OS !== 'android' || !pushConfig.android?.pushProviderName) {
|
|
10
|
+
logger.debug(`setupAndroidPushEvents skipped: platform=${Platform.OS} pushProviderName=${pushConfig.android?.pushProviderName}`);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const callingx = getCallingxLib();
|
|
14
|
+
callingx.addEventListener('ringCallPushReceived', params => {
|
|
15
|
+
logger.debug(`ringCallPushReceived event call_cid: ${params?.call_cid}`);
|
|
16
|
+
onRingNotificationReceived(params).catch(error => {
|
|
17
|
+
logger.error(`Error in onRingNotificationReceived: ${error}`);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=setupAndroidPushEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","videoLoggerSystem","getCallingxLib","onRingNotificationReceived","setupAndroidPushEvents","pushConfig","logger","getLogger","OS","android","pushProviderName","debug","callingx","addEventListener","params","call_cid","catch","error"],"sourceRoot":"../../../../src","sources":["utils/push/setupAndroidPushEvents.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,SAASC,cAAc,QAAQ,QAAQ;AACvC,SAASC,0BAA0B,QAAQ,oBAAoB;AAE/D,OAAO,SAASC,sBAAsBA,CACpCC,UAAkD,EAClD;EACA,MAAMC,MAAM,GAAGL,iBAAiB,CAACM,SAAS,CAAC,wBAAwB,CAAC;EACpE,IAAIP,QAAQ,CAACQ,EAAE,KAAK,SAAS,IAAI,CAACH,UAAU,CAACI,OAAO,EAAEC,gBAAgB,EAAE;IACtEJ,MAAM,CAACK,KAAK,CACV,4CAA4CX,QAAQ,CAACQ,EAAE,qBAAqBH,UAAU,CAACI,OAAO,EAAEC,gBAAgB,EAClH,CAAC;IACD;EACF;EAEA,MAAME,QAAQ,GAAGV,cAAc,CAAC,CAAC;EACjCU,QAAQ,CAACC,gBAAgB,CAAC,sBAAsB,EAAGC,MAAM,IAAK;IAC5DR,MAAM,CAACK,KAAK,CAAC,wCAAwCG,MAAM,EAAEC,QAAQ,EAAE,CAAC;IACxEZ,0BAA0B,CAACW,MAAM,CAAC,CAACE,KAAK,CAAEC,KAAK,IAAK;MAClDX,MAAM,CAACW,KAAK,CAAC,wCAAwCA,KAAK,EAAE,CAAC;IAC/D,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import { CallingState, videoLoggerSystem } from '@stream-io/video-client';
|
|
|
4
4
|
import { clearPushWSEventSubscriptions, processCallFromPushInBackground } from './internal/utils';
|
|
5
5
|
import { getCallingxLib } from './libs/callingx';
|
|
6
6
|
import { Platform } from 'react-native';
|
|
7
|
+
import { onRingNotificationReceived } from './internal/android';
|
|
7
8
|
const logger = videoLoggerSystem.getLogger('callingx');
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -36,11 +37,10 @@ export function setupCallingExpEvents(pushConfig) {
|
|
|
36
37
|
eventName,
|
|
37
38
|
params
|
|
38
39
|
} = event;
|
|
40
|
+
logger.debug(`${eventName} delayed event`);
|
|
39
41
|
if (eventName === 'answerCall') {
|
|
40
|
-
logger.debug(`answerCall delayed event callId: ${params?.callId}`);
|
|
41
42
|
onAcceptCall(pushConfig)(params);
|
|
42
43
|
} else if (eventName === 'endCall') {
|
|
43
|
-
logger.debug(`endCall delayed event callId: ${params?.callId}`);
|
|
44
44
|
onEndCall(pushConfig)(params);
|
|
45
45
|
} else if (eventName === 'didActivateAudioSession') {
|
|
46
46
|
onDidActivateAudioSession();
|
|
@@ -48,6 +48,10 @@ export function setupCallingExpEvents(pushConfig) {
|
|
|
48
48
|
onDidDeactivateAudioSession();
|
|
49
49
|
} else if (eventName === 'providerReset') {
|
|
50
50
|
onProviderReset(pushConfig)(params);
|
|
51
|
+
} else if (eventName === 'ringCallPushReceived') {
|
|
52
|
+
onRingNotificationReceived(params).catch(error => {
|
|
53
|
+
logger.error(`Error in onRingNotificationReceived: ${error}`);
|
|
54
|
+
});
|
|
51
55
|
}
|
|
52
56
|
});
|
|
53
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CallingState","videoLoggerSystem","clearPushWSEventSubscriptions","processCallFromPushInBackground","getCallingxLib","Platform","logger","getLogger","setupCallingExpEvents","pushConfig","hasPushProvider","OS","android","pushProviderName","ios","hasOngoingCalls","enableOngoingCalls","callingx","addEventListener","params","onAcceptCall","onEndCall","onDidActivateAudioSession","onDidDeactivateAudioSession","onProviderReset","events","getInitialEvents","forEach","event","eventName","debug","
|
|
1
|
+
{"version":3,"names":["CallingState","videoLoggerSystem","clearPushWSEventSubscriptions","processCallFromPushInBackground","getCallingxLib","Platform","onRingNotificationReceived","logger","getLogger","setupCallingExpEvents","pushConfig","hasPushProvider","OS","android","pushProviderName","ios","hasOngoingCalls","enableOngoingCalls","callingx","addEventListener","params","onAcceptCall","onEndCall","onDidActivateAudioSession","onDidDeactivateAudioSession","onProviderReset","events","getInitialEvents","forEach","event","eventName","debug","catch","error","callCids","join","length","videoClient","createStreamVideoClient","e","cid","call","state","calls","find","c","callingState","LEFT","leave","callId","call_cid","source","didFail","fulfillAnswerCallAction","fulfillEndCallAction"],"sourceRoot":"../../../../src","sources":["utils/push/setupCallingExpEvents.ts"],"mappings":";;AAAA,SACEA,YAAY,EACZC,iBAAiB,QAEZ,yBAAyB;AAEhC,SACEC,6BAA6B,EAC7BC,+BAA+B,QAC1B,kBAAkB;AACzB,SACEC,cAAc,QAGT,iBAAiB;AACxB,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,0BAA0B,QAAQ,oBAAoB;AAI/D,MAAMC,MAAM,GAAGN,iBAAiB,CAACO,SAAS,CAAC,UAAU,CAAC;;AAEtD;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAACC,UAAmC,EAAE;EACzE,MAAMC,eAAe,GAClBN,QAAQ,CAACO,EAAE,KAAK,SAAS,IAAIF,UAAU,CAACG,OAAO,EAAEC,gBAAgB,IACjET,QAAQ,CAACO,EAAE,KAAK,KAAK,IAAIF,UAAU,CAACK,GAAG,EAAED,gBAAi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AC7BO,UAAU,EACVwC,QAAQ,EACR,SAAS,EACRE,OAAO,IAAK;IACXlC,QAAQ,CAACoC,oBAAoB,CAACJ,QAAQ,EAAEE,OAAO,CAAC;EAClD,CACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -7,18 +7,17 @@ import { onVoipNotificationReceived } from './internal/ios';
|
|
|
7
7
|
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
8
8
|
import { getCallingxLib } from './libs';
|
|
9
9
|
export function setupIosVoipPushEvents(pushConfig) {
|
|
10
|
-
if (Platform.OS !== 'ios' || !pushConfig.ios?.pushProviderName) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
10
|
const logger = videoLoggerSystem.getLogger('setupIosVoipPushEvents');
|
|
14
|
-
if (!pushConfig.ios
|
|
15
|
-
|
|
16
|
-
logger.debug('ios pushProviderName is not defined, so skipping the setupIosVoipPushEvents');
|
|
11
|
+
if (Platform.OS !== 'ios' || !pushConfig.ios?.pushProviderName) {
|
|
12
|
+
logger.debug(`setupIosVoipPushEvents skipped: platform=${Platform.OS} pushProviderName=${pushConfig.ios?.pushProviderName}`);
|
|
17
13
|
return;
|
|
18
14
|
}
|
|
19
15
|
const callingx = getCallingxLib();
|
|
20
16
|
callingx.addEventListener('voipNotificationReceived', params => {
|
|
21
|
-
|
|
17
|
+
logger.debug(`voipNotificationReceived event call_cid: ${params?.stream?.call_cid}`);
|
|
18
|
+
onVoipNotificationReceived(params, pushConfig).catch(error => {
|
|
19
|
+
logger.error(`Error in onVoipNotificationReceived: ${error}`);
|
|
20
|
+
});
|
|
22
21
|
});
|
|
23
22
|
}
|
|
24
23
|
//# sourceMappingURL=setupIosVoipPushEvents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","onVoipNotificationReceived","videoLoggerSystem","getCallingxLib","setupIosVoipPushEvents","pushConfig","
|
|
1
|
+
{"version":3,"names":["Platform","onVoipNotificationReceived","videoLoggerSystem","getCallingxLib","setupIosVoipPushEvents","pushConfig","logger","getLogger","OS","ios","pushProviderName","debug","callingx","addEventListener","params","stream","call_cid","catch","error"],"sourceRoot":"../../../../src","sources":["utils/push/setupIosVoipPushEvents.ts"],"mappings":";;AAAA;;AAEA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,0BAA0B,QAAQ,gBAAgB;AAE3D,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,cAAc,QAAQ,QAAQ;AAEvC,OAAO,SAASC,sBAAsBA,CACpCC,UAAkD,EAClD;EACA,MAAMC,MAAM,GAAGJ,iBAAiB,CAACK,SAAS,CAAC,wBAAwB,CAAC;EACpE,IAAIP,QAAQ,CAACQ,EAAE,KAAK,KAAK,IAAI,CAACH,UAAU,CAACI,GAAG,EAAEC,gBAAgB,EAAE;IAC9DJ,MAAM,CAACK,KAAK,CACV,4CAA4CX,QAAQ,CAACQ,EAAE,qBAAqBH,UAAU,CAACI,GAAG,EAAEC,gBAAgB,EAC9G,CAAC;IACD;EACF;EAEA,MAAME,QAAQ,GAAGT,cAAc,CAAC,CAAC;EACjCS,QAAQ,CAACC,gBAAgB,CAAC,0BAA0B,EAAGC,MAAM,IAAK;IAChER,MAAM,CAACK,KAAK,CACV,4CAA4CG,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EACtE,CAAC;IACDf,0BAA0B,CAACa,MAAM,EAAET,UAAU,CAAC,CAACY,KAAK,CAAEC,KAAK,IAAK;MAC9DZ,MAAM,CAACY,KAAK,CAAC,wCAAwCA,KAAK,EAAE,CAAC;IAC/D,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isFirebaseStreamVideoMessage","message","data","sender"],"sourceRoot":"../../../../src","sources":["utils/push/utils.ts"],"mappings":";;AAWA,OAAO,SAASA,4BAA4BA,
|
|
1
|
+
{"version":3,"names":["isFirebaseStreamVideoMessage","message","data","sender"],"sourceRoot":"../../../../src","sources":["utils/push/utils.ts"],"mappings":";;AAWA,OAAO,SAASA,4BAA4BA,CAACC,OAA8B,EAAE;EAC3E,OAAOA,OAAO,CAACC,IAAI,EAAEC,MAAM,KAAK,cAAc;AAChD","ignoreList":[]}
|
package/dist/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCallingExpWithCallingStateEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useCallingExpWithCallingStateEffect.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,eAAO,MAAM,mCAAmC,
|
|
1
|
+
{"version":3,"file":"useCallingExpWithCallingStateEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useCallingExpWithCallingStateEffect.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,eAAO,MAAM,mCAAmC,YA+R/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AAqGA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,YA6IzC,CAAC"}
|
|
@@ -1,85 +1,28 @@
|
|
|
1
|
+
import { type LoopbackTracks } from '@stream-io/video-client';
|
|
1
2
|
export type LoopbackRecordingState = 'idle' | 'awaiting-streams' | 'recording';
|
|
2
|
-
export type ResolvedStreams =
|
|
3
|
-
audioTrack?: MediaStreamTrack;
|
|
4
|
-
videoTrack?: MediaStreamTrack;
|
|
5
|
-
};
|
|
3
|
+
export type ResolvedStreams = LoopbackTracks;
|
|
6
4
|
export interface StartLoopbackRecordingOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Whether to include the loopback video track in the recording.
|
|
9
|
-
* Defaults to `true`. Set to `false` for an audio-only recording.
|
|
10
|
-
* Audio is always recorded — there is no video-only mode.
|
|
11
|
-
*/
|
|
5
|
+
/** Whether to include loopback video. Audio is always recorded. */
|
|
12
6
|
includeVideo?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Maximum recording duration in milliseconds, after which the
|
|
15
|
-
* recording auto-stops and finalises the file.
|
|
16
|
-
*
|
|
17
|
-
* Defaults to `10_000` (10 seconds). Clamped to
|
|
18
|
-
* `[5_000, 120_000]` (5 seconds — 2 minutes).
|
|
19
|
-
*/
|
|
7
|
+
/** Maximum recording duration in milliseconds. */
|
|
20
8
|
maxDurationMs?: number;
|
|
21
9
|
}
|
|
22
10
|
export interface UseLoopbackRecordingResult {
|
|
23
|
-
/**
|
|
24
|
-
* Start a recording. The hook waits internally for the SFU loopback
|
|
25
|
-
* streams to arrive on `localParticipant`, then begins recording.
|
|
26
|
-
*
|
|
27
|
-
* The returned promise resolves with the produced `file://` URI **at
|
|
28
|
-
* the recording's terminal moment** — whether that is the auto-stop
|
|
29
|
-
* timer expiring, an explicit `stopRecording` call, or a cleanup-
|
|
30
|
-
* driven stop on unmount/leave. Resolves with `null` if no file was
|
|
31
|
-
* produced (writer torn down before any buffer arrived, or
|
|
32
|
-
* `stopRecording` was called while still awaiting streams). Rejects
|
|
33
|
-
* on a fatal error, if a recording is already running, or if the
|
|
34
|
-
* stream-wait times out.
|
|
35
|
-
*/
|
|
11
|
+
/** Starts recording and resolves with a `file://` URI. */
|
|
36
12
|
startRecording: (options?: StartLoopbackRecordingOptions) => Promise<string | null>;
|
|
37
|
-
/**
|
|
38
|
-
* Signal an early termination. While `awaiting-streams` this aborts
|
|
39
|
-
* the wait and the pending `startRecording` resolves with `null`.
|
|
40
|
-
* While `recording` this signals native finalisation and resolves
|
|
41
|
-
* once it completes.
|
|
42
|
-
*/
|
|
13
|
+
/** Stops the current recording or stream wait. */
|
|
43
14
|
stopRecording: () => Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Recursively delete every file under the SDK's recordings directory.
|
|
46
|
-
*/
|
|
15
|
+
/** Deletes all SDK recording files. */
|
|
47
16
|
clearRecordings: () => Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* List every `file://` URI in the SDK's recordings directory, sorted
|
|
50
|
-
* most-recent first. Returns an empty array if the directory doesn't
|
|
51
|
-
* exist yet.
|
|
52
|
-
*/
|
|
17
|
+
/** Lists SDK recording file URIs. */
|
|
53
18
|
getRecordings: () => Promise<string[]>;
|
|
54
|
-
/**
|
|
55
|
-
* Lifecycle phase of the recording, owned by the hook:
|
|
56
|
-
* - `'idle'`: no recording in progress.
|
|
57
|
-
* - `'awaiting-streams'`: `startRecording` was called but the SFU
|
|
58
|
-
* has not yet echoed the loopback tracks back.
|
|
59
|
-
* - `'recording'`: native pipeline is actively writing.
|
|
60
|
-
*/
|
|
19
|
+
/** Lifecycle phase of the recording. */
|
|
61
20
|
recordingState: LoopbackRecordingState;
|
|
62
|
-
/**
|
|
63
|
-
* The SFU loopback video stream on the local participant, when
|
|
64
|
-
* present. Identified by reference inequality against
|
|
65
|
-
* `call.camera.state.mediaStream`.
|
|
66
|
-
*/
|
|
21
|
+
/** SFU-echoed video stream on the local participant. */
|
|
67
22
|
loopbackVideoStream?: MediaStream;
|
|
68
|
-
/**
|
|
69
|
-
* The SFU loopback audio stream on the local participant, when
|
|
70
|
-
* present. Identified by reference inequality against
|
|
71
|
-
* `call.microphone.state.mediaStream`.
|
|
72
|
-
*/
|
|
23
|
+
/** SFU-echoed audio stream on the local participant. */
|
|
73
24
|
loopbackAudioStream?: MediaStream;
|
|
74
25
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Records the SFU loopback streams (audio + video) on the local participant
|
|
77
|
-
* to a local MP4 file. Designed for the `allowOwnTracksLoopback` pre-call test mode:
|
|
78
|
-
* the SFU echoes the caller's published tracks back through the Subscriber
|
|
79
|
-
* peer connection. The hook identifies the loopback streams on the local
|
|
80
|
-
* participant by reference inequality against
|
|
81
|
-
* `call.camera.state.mediaStream` / `call.microphone.state.mediaStream` —
|
|
82
|
-
* the canonical references to the local capture — and captures them.
|
|
83
|
-
*/
|
|
26
|
+
/** Records SFU loopback streams to a local MP4 file. */
|
|
84
27
|
export declare function useLoopbackRecording(): UseLoopbackRecordingResult;
|
|
85
28
|
//# sourceMappingURL=useLoopbackRecording.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoopbackRecording.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLoopbackRecording.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLoopbackRecording.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLoopbackRecording.ts"],"names":[],"mappings":"AAEA,OAAO,EAUL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AAOjC,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,kBAAkB,GAAG,WAAW,CAAC;AAE/E,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC;AAE7C,MAAM,WAAW,6BAA6B;IAC5C,mEAAmE;IACnE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B;IACzC,0DAA0D;IAC1D,cAAc,EAAE,CACd,OAAO,CAAC,EAAE,6BAA6B,KACpC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B,kDAAkD;IAClD,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,uCAAuC;IACvC,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,qCAAqC;IACrC,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,wCAAwC;IACxC,cAAc,EAAE,sBAAsB,CAAC;IACvC,wDAAwD;IACxD,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,wDAAwD;IACxD,mBAAmB,CAAC,EAAE,WAAW,CAAC;CACnC;AAED,wDAAwD;AACxD,wBAAgB,oBAAoB,IAAI,0BAA0B,CAwLjE"}
|
|
@@ -54,6 +54,19 @@ export declare class StreamVideoRN {
|
|
|
54
54
|
*/
|
|
55
55
|
static onPushLogout(): Promise<void>;
|
|
56
56
|
static clearPushLogoutCallbacks(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Android only. Opt out of the Android 11+ communication-mode keep-alive.
|
|
59
|
+
*
|
|
60
|
+
* By default the SDK plays a silent voice-communication track for the duration of a
|
|
61
|
+
* communicator-role call, so Android does not reset `MODE_IN_COMMUNICATION` ~6s after it is
|
|
62
|
+
* set (which breaks audio routing and echo cancellation).
|
|
63
|
+
* See {@link https://issuetracker.google.com/issues/209493718}
|
|
64
|
+
*
|
|
65
|
+
* Call this at app start, alongside {@link setPushConfig} — the native audio manager
|
|
66
|
+
* rejects the change once it has been activated for a call. No-op on iOS and on
|
|
67
|
+
* Android below API 30.
|
|
68
|
+
*/
|
|
69
|
+
static setDisableCommunicationModeWorkaround(disabled: boolean): void;
|
|
57
70
|
/**
|
|
58
71
|
* Play native busy tone for call rejection
|
|
59
72
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAajD,KAAK,WAAW,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC;AAgDF,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,MAAM,CAA+B;IAEpD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CACjB,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAK5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IA0BvE,MAAM,CAAC,SAAS;IAIhB;;;OAGG;IACH,MAAM,CAAC,YAAY;IASnB,MAAM,CAAC,wBAAwB;IAI/B;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,qCAAqC,CAAC,QAAQ,EAAE,OAAO;IAe9D;;OAEG;WACU,YAAY;IAIzB;;OAEG;WACU,YAAY;IAIzB;;;OAGG;WACU,6BAA6B,IAAI,OAAO,CAAC,OAAO,CAAC;IAQ9D;;;OAGG;WACU,4BAA4B,IAAI,OAAO,CAAC,OAAO,CAAC;IAQ7D;;;OAGG;WACU,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC;CAO1D"}
|
|
@@ -166,8 +166,7 @@ export type StreamVideoConfig = {
|
|
|
166
166
|
*/
|
|
167
167
|
notificationTexts: KeepAliveAndroidNotificationTexts;
|
|
168
168
|
/**
|
|
169
|
-
* The task to run in the foreground service
|
|
170
|
-
* The task must resolve a promise once complete
|
|
169
|
+
* The task to run in the foreground service.
|
|
171
170
|
*/
|
|
172
171
|
taskToRun: (call: Call) => Promise<void>;
|
|
173
172
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,KAAK,IAAI,EACV,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG;IAC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AAU,CAAC;SACpD,CAAC;QACF;;;WAGG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC;;;;;;;;;;;;;;;;;WAiBG;QACH,uBAAuB,EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;KACvE,CAAC;IACF,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP;;eAEG;YACH,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC;YAC3D;;eAEG;YACH,iBAAiB,EAAE,iCAAiC,CAAC;YACrD;;eAEG;YACH,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;SAC1C,CAAC;KACH,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/internal/callingx/callingx.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAKjC;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,cAAc,EAAE,GAAG,SAAS,EACzC,YAAY,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAClD,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,CAgCR;
|
|
1
|
+
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/internal/callingx/callingx.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAKjC;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,cAAc,EAAE,GAAG,SAAS,EACzC,YAAY,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAClD,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,CAgCR;AAsBD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,iBAyBpD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,iBAoDrE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,aAAa,iBAmBvE;AAED,wBAAsB,2BAA2B,kBAehD;AAED,wBAAgB,6BAA6B,SAe5C"}
|
|
@@ -7,4 +7,13 @@ export declare const KEEP_CALL_ALIVE_HEADLESS_TASK_NAME = "StreamVideoKeepCallAl
|
|
|
7
7
|
export declare const keepCallAliveCallRef: {
|
|
8
8
|
current: Call | undefined;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Ends the currently running keep-alive headless task.
|
|
12
|
+
*
|
|
13
|
+
* The task's promise is app-provided (`foregroundService.android.taskToRun`) and by default never
|
|
14
|
+
* resolves, so stopping the native service alone would leave the task registered in
|
|
15
|
+
* `HeadlessJsTaskContext` forever - which keeps RN's timer choreographer callback posted for the
|
|
16
|
+
* rest of the process lifetime. Resolving it here lets React Native unwind the task properly.
|
|
17
|
+
*/
|
|
18
|
+
export declare const endKeepCallAliveHeadlessTask: () => void;
|
|
10
19
|
//# sourceMappingURL=keepCallAliveHeadlessTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keepCallAliveHeadlessTask.d.ts","sourceRoot":"","sources":["../../../src/utils/keepCallAliveHeadlessTask.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIpD,eAAO,MAAM,kCAAkC,6BAA6B,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE;IAAE,OAAO,EAAE,IAAI,GAAG,SAAS,CAAA;CAE7D,CAAC"}
|
|
1
|
+
{"version":3,"file":"keepCallAliveHeadlessTask.d.ts","sourceRoot":"","sources":["../../../src/utils/keepCallAliveHeadlessTask.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIpD,eAAO,MAAM,kCAAkC,6BAA6B,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE;IAAE,OAAO,EAAE,IAAI,GAAG,SAAS,CAAA;CAE7D,CAAC;AAIF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,YAGxC,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { StreamVideoClient } from '@stream-io/video-client';
|
|
2
2
|
import type { StreamVideoConfig } from '../StreamVideoRN/types';
|
|
3
|
-
import { type FirebaseMessagingTypes } from './libs';
|
|
4
3
|
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
5
4
|
/** Send token to stream */
|
|
6
5
|
export declare function initAndroidPushToken(client: StreamVideoClient, pushConfig: PushConfig, setUnsubscribeListener: (unsubscribe: () => void) => void): Promise<void>;
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* @deprecated Ring notifications are now handled by the SDK internally. This method is a no-op;
|
|
8
|
+
* you can safely remove `firebaseDataHandler(...)` wiring from your Firebase messaging handlers.
|
|
10
9
|
*/
|
|
11
|
-
export declare const firebaseDataHandler: (data
|
|
10
|
+
export declare const firebaseDataHandler: (data?: any) => Promise<void>;
|
|
12
11
|
export {};
|
|
13
12
|
//# sourceMappingURL=android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAIzD,4BAA4B;AAC5B,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBA4C1D;AAGD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAU,OAAO,GAAG,kBAQnD,CAAC"}
|