We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7909ad commit e63e08eCopy full SHA for e63e08e
packages/react-native-sdk/src/utils/internal/registerSDKGlobals.ts
@@ -0,0 +1,26 @@
1
+import { StreamRNVideoSDKGlobals } from '@stream-io/video-client';
2
+import { callManager } from '../../modules/call-manager';
3
+
4
+declare global {
5
+ var streamRNVideoSDK: StreamRNVideoSDKGlobals | undefined;
6
+}
7
8
+const streamRNVideoSDKGlobals: StreamRNVideoSDKGlobals = {
9
+ callManager: {
10
+ setup: () => {
11
+ callManager.setup();
12
+ },
13
+ start: () => {
14
+ callManager.start();
15
16
+ stop: () => {
17
+ callManager.stop();
18
19
20
+};
21
22
+export function registerSDKGlobals() {
23
+ if (!global.streamRNVideoSDK) {
24
+ global.streamRNVideoSDK = streamRNVideoSDKGlobals;
25
+ }
26
0 commit comments