@stream-io/video-react-native-sdk 1.8.0 → 1.9.0
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 +7 -0
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNative.kt +23 -11
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +71 -23
- package/dist/commonjs/components/Call/CallContent/CallContent.js +1 -1
- package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js +2 -3
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js +2 -3
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/commonjs/hooks/useAutoEnterPiPEffect.js +5 -3
- package/dist/commonjs/hooks/useAutoEnterPiPEffect.js.map +1 -1
- package/dist/commonjs/hooks/useIsInPiPMode.js +14 -24
- package/dist/commonjs/hooks/useIsInPiPMode.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/AppStateListener.js +101 -0
- package/dist/commonjs/providers/StreamCall/AppStateListener.js.map +1 -0
- package/dist/commonjs/providers/StreamCall/DeviceStats.js +45 -0
- package/dist/commonjs/providers/StreamCall/DeviceStats.js.map +1 -0
- package/dist/commonjs/providers/StreamCall/index.js +69 -0
- package/dist/commonjs/providers/StreamCall/index.js.map +1 -0
- package/dist/commonjs/utils/internal/rxSubjects.js +10 -0
- package/dist/commonjs/utils/internal/rxSubjects.js.map +1 -0
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallContent/CallContent.js +1 -1
- package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js +2 -3
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js +2 -3
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/module/hooks/useAutoEnterPiPEffect.js +5 -3
- package/dist/module/hooks/useAutoEnterPiPEffect.js.map +1 -1
- package/dist/module/hooks/useIsInPiPMode.js +14 -24
- package/dist/module/hooks/useIsInPiPMode.js.map +1 -1
- package/dist/module/providers/StreamCall/AppStateListener.js +94 -0
- package/dist/module/providers/StreamCall/AppStateListener.js.map +1 -0
- package/dist/module/providers/StreamCall/DeviceStats.js +38 -0
- package/dist/module/providers/StreamCall/DeviceStats.js.map +1 -0
- package/dist/module/providers/StreamCall/index.js +61 -0
- package/dist/module/providers/StreamCall/index.js.map +1 -0
- package/dist/module/utils/internal/rxSubjects.js +4 -0
- package/dist/module/utils/internal/rxSubjects.js.map +1 -0
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts +2 -2
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts +2 -2
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
- package/dist/typescript/hooks/useAutoEnterPiPEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/useIsInPiPMode.d.ts +1 -1
- package/dist/typescript/hooks/useIsInPiPMode.d.ts.map +1 -1
- package/dist/typescript/providers/StreamCall/AppStateListener.d.ts +2 -0
- package/dist/typescript/providers/StreamCall/AppStateListener.d.ts.map +1 -0
- package/dist/typescript/providers/StreamCall/DeviceStats.d.ts +5 -0
- package/dist/typescript/providers/StreamCall/DeviceStats.d.ts.map +1 -0
- package/dist/typescript/providers/{StreamCall.d.ts → StreamCall/index.d.ts} +1 -1
- package/dist/typescript/providers/StreamCall/index.d.ts.map +1 -0
- package/dist/typescript/utils/internal/rxSubjects.d.ts +4 -0
- package/dist/typescript/utils/internal/rxSubjects.d.ts.map +1 -0
- package/dist/typescript/version.d.ts +1 -1
- package/expo-config-plugin/dist/common/types.d.ts +1 -4
- package/expo-config-plugin/dist/withMainActivity.js +42 -36
- package/package.json +1 -1
- package/src/components/Call/CallContent/CallContent.tsx +2 -1
- package/src/components/Call/CallLayout/CallParticipantsGrid.tsx +2 -6
- package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +2 -6
- package/src/hooks/useAutoEnterPiPEffect.tsx +5 -2
- package/src/hooks/useIsInPiPMode.tsx +16 -52
- package/src/providers/StreamCall/AppStateListener.tsx +125 -0
- package/src/providers/StreamCall/DeviceStats.tsx +59 -0
- package/src/providers/StreamCall/index.tsx +78 -0
- package/src/utils/internal/rxSubjects.ts +5 -0
- package/src/version.ts +1 -1
- package/dist/commonjs/providers/StreamCall.js +0 -155
- package/dist/commonjs/providers/StreamCall.js.map +0 -1
- package/dist/module/providers/StreamCall.js +0 -146
- package/dist/module/providers/StreamCall.js.map +0 -1
- package/dist/typescript/providers/StreamCall.d.ts.map +0 -1
- package/src/providers/StreamCall.tsx +0 -205
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
CallingState,
|
|
5
|
+
setThermalState,
|
|
6
|
+
setPowerState,
|
|
7
|
+
} from '@stream-io/video-client';
|
|
8
|
+
import { NativeModules, Platform, NativeEventEmitter } from 'react-native';
|
|
9
|
+
|
|
10
|
+
const eventEmitter = NativeModules?.StreamVideoReactNative
|
|
11
|
+
? new NativeEventEmitter(NativeModules?.StreamVideoReactNative)
|
|
12
|
+
: undefined;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* This is a renderless component to get the device stats like thermal state and power saver mode.
|
|
16
|
+
*/
|
|
17
|
+
export const DeviceStats = () => {
|
|
18
|
+
const { useCallCallingState } = useCallStateHooks();
|
|
19
|
+
const callingState = useCallCallingState();
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (callingState !== CallingState.JOINED) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
NativeModules?.StreamVideoReactNative.isLowPowerModeEnabled().then(
|
|
27
|
+
(initialPowerMode: boolean) => setPowerState(initialPowerMode)
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
let powerModeSubscription = eventEmitter?.addListener(
|
|
31
|
+
'isLowPowerModeEnabled',
|
|
32
|
+
(isLowPowerMode: boolean) => setPowerState(isLowPowerMode)
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
NativeModules?.StreamVideoReactNative.currentThermalState().then(
|
|
36
|
+
(initialState: string) => setThermalState(initialState)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
let thermalStateSubscription = eventEmitter?.addListener(
|
|
40
|
+
'thermalStateDidChange',
|
|
41
|
+
(thermalState: string) => setThermalState(thermalState)
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
// on android we need to explicitly start and stop the thermal status updates
|
|
45
|
+
if (Platform.OS === 'android') {
|
|
46
|
+
NativeModules?.StreamVideoReactNative.startThermalStatusUpdates();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return () => {
|
|
50
|
+
powerModeSubscription?.remove();
|
|
51
|
+
thermalStateSubscription?.remove();
|
|
52
|
+
if (Platform.OS === 'android') {
|
|
53
|
+
NativeModules?.StreamVideoReactNative.stopThermalStatusUpdates();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}, [callingState]);
|
|
57
|
+
|
|
58
|
+
return null;
|
|
59
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { StreamCallProvider } from '@stream-io/video-react-bindings';
|
|
2
|
+
import React, { PropsWithChildren, useEffect } from 'react';
|
|
3
|
+
import { Call } from '@stream-io/video-client';
|
|
4
|
+
import { useIosCallkeepWithCallingStateEffect } from '../../hooks/push/useIosCallkeepWithCallingStateEffect';
|
|
5
|
+
import {
|
|
6
|
+
canAddPushWSSubscriptionsRef,
|
|
7
|
+
clearPushWSEventSubscriptions,
|
|
8
|
+
} from '../../utils/push/internal/utils';
|
|
9
|
+
import { useAndroidKeepCallAliveEffect } from '../../hooks/useAndroidKeepCallAliveEffect';
|
|
10
|
+
import { AppStateListener } from './AppStateListener';
|
|
11
|
+
import { DeviceStats } from './DeviceStats';
|
|
12
|
+
|
|
13
|
+
// const PIP_CHANGE_EVENT = 'StreamVideoReactNative_PIP_CHANGE_EVENT';
|
|
14
|
+
|
|
15
|
+
// const isAndroid8OrAbove = Platform.OS === 'android' && Platform.Version >= 26;
|
|
16
|
+
|
|
17
|
+
export type StreamCallProps = {
|
|
18
|
+
/**
|
|
19
|
+
* Stream Call instance propagated to the component's children as a part of StreamCallContext.
|
|
20
|
+
* Children can access it with useCall() hook.
|
|
21
|
+
*/
|
|
22
|
+
call: Call;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* StreamCall is a wrapper component that orchestrates the call life cycle logic and
|
|
26
|
+
* provides the call object to the children components.
|
|
27
|
+
* @param PropsWithChildren<StreamCallProps>
|
|
28
|
+
*
|
|
29
|
+
* @category Client State
|
|
30
|
+
*/
|
|
31
|
+
export const StreamCall = ({
|
|
32
|
+
call,
|
|
33
|
+
children,
|
|
34
|
+
}: PropsWithChildren<StreamCallProps>) => {
|
|
35
|
+
return (
|
|
36
|
+
<StreamCallProvider call={call}>
|
|
37
|
+
<AppStateListener />
|
|
38
|
+
<AndroidKeepCallAlive />
|
|
39
|
+
<IosInformCallkeepCallEnd />
|
|
40
|
+
<ClearPushWSSubscriptions />
|
|
41
|
+
<DeviceStats />
|
|
42
|
+
{children}
|
|
43
|
+
</StreamCallProvider>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* This is a renderless component to keep the call alive on Android device using useAndroidKeepCallAliveEffect.
|
|
49
|
+
* useAndroidKeepCallAliveEffect needs to called inside a child of StreamCallProvider.
|
|
50
|
+
*/
|
|
51
|
+
const AndroidKeepCallAlive = () => {
|
|
52
|
+
useAndroidKeepCallAliveEffect();
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* This is a renderless component to end the call in callkeep for ios.
|
|
58
|
+
* useAndroidKeepCallAliveEffect needs to called inside a child of StreamCallProvider.
|
|
59
|
+
*/
|
|
60
|
+
const IosInformCallkeepCallEnd = () => {
|
|
61
|
+
useIosCallkeepWithCallingStateEffect();
|
|
62
|
+
return null;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* This is a renderless component to clear all push ws event subscriptions
|
|
67
|
+
* and set whether push ws subscriptions can be added or not.
|
|
68
|
+
*/
|
|
69
|
+
const ClearPushWSSubscriptions = () => {
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
clearPushWSEventSubscriptions();
|
|
72
|
+
canAddPushWSSubscriptionsRef.current = false;
|
|
73
|
+
return () => {
|
|
74
|
+
canAddPushWSSubscriptionsRef.current = true;
|
|
75
|
+
};
|
|
76
|
+
}, []);
|
|
77
|
+
return null;
|
|
78
|
+
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.
|
|
1
|
+
export const version = '1.9.0';
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StreamCall = void 0;
|
|
7
|
-
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _videoClient = require("@stream-io/video-client");
|
|
10
|
-
var _useIosCallkeepWithCallingStateEffect = require("../hooks/push/useIosCallkeepWithCallingStateEffect");
|
|
11
|
-
var _utils = require("../utils/push/internal/utils");
|
|
12
|
-
var _useAndroidKeepCallAliveEffect = require("../hooks/useAndroidKeepCallAliveEffect");
|
|
13
|
-
var _reactNative = require("react-native");
|
|
14
|
-
var _shouldDisableIOSLocalVideoOnBackground = require("../utils/internal/shouldDisableIOSLocalVideoOnBackground");
|
|
15
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
-
/**
|
|
18
|
-
* StreamCall is a wrapper component that orchestrates the call life cycle logic and
|
|
19
|
-
* provides the call object to the children components.
|
|
20
|
-
* @param PropsWithChildren<StreamCallProps>
|
|
21
|
-
*
|
|
22
|
-
* @category Client State
|
|
23
|
-
*/
|
|
24
|
-
const StreamCall = ({
|
|
25
|
-
call,
|
|
26
|
-
children
|
|
27
|
-
}) => {
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(_videoReactBindings.StreamCallProvider, {
|
|
29
|
-
call: call
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(AppStateListener, null), /*#__PURE__*/_react.default.createElement(AndroidKeepCallAlive, null), /*#__PURE__*/_react.default.createElement(IosInformCallkeepCallEnd, null), /*#__PURE__*/_react.default.createElement(ClearPushWSSubscriptions, null), /*#__PURE__*/_react.default.createElement(DeviceStats, null), children);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// Resume/Disable video stream tracks when app goes to background/foreground
|
|
34
|
-
// To save on CPU resources
|
|
35
|
-
exports.StreamCall = StreamCall;
|
|
36
|
-
const AppStateListener = () => {
|
|
37
|
-
const call = (0, _videoReactBindings.useCall)();
|
|
38
|
-
const appState = (0, _react.useRef)(_reactNative.AppState.currentState);
|
|
39
|
-
(0, _react.useEffect)(() => {
|
|
40
|
-
// due to strange behavior in iOS when app goes to "inactive" state
|
|
41
|
-
// we dont check for inactive states
|
|
42
|
-
// ref: https://www.reddit.com/r/reactnative/comments/15kib42/appstate_behavior_in_ios_when_swiping_down_to/
|
|
43
|
-
const subscription = _reactNative.AppState.addEventListener('change', nextAppState => {
|
|
44
|
-
if (appState.current.match(/background/) && nextAppState === 'active') {
|
|
45
|
-
if (call?.camera?.state.status === 'enabled' && _reactNative.Platform.OS === 'android') {
|
|
46
|
-
// when device is locked and resumed, the status isnt made disabled but stays enabled
|
|
47
|
-
// as a workaround we stop the track and enable again if its already in enabled state
|
|
48
|
-
call?.camera?.disable(true).then(() => {
|
|
49
|
-
call?.camera?.enable();
|
|
50
|
-
});
|
|
51
|
-
} else {
|
|
52
|
-
call?.camera?.resume();
|
|
53
|
-
}
|
|
54
|
-
appState.current = nextAppState;
|
|
55
|
-
} else if (appState.current === 'active' && nextAppState.match(/background/)) {
|
|
56
|
-
if (_reactNative.Platform.OS === 'android') {
|
|
57
|
-
// in Android, we need to check if we are in PiP mode
|
|
58
|
-
// in PiP mode, we don't want to disable the camera
|
|
59
|
-
_reactNative.NativeModules?.StreamVideoReactNative?.isInPiPMode().then(isInPiP => {
|
|
60
|
-
if (!isInPiP) {
|
|
61
|
-
if (_reactNative.AppState.currentState === 'active') {
|
|
62
|
-
// this is to handle the case that the app became active as soon as it went to background
|
|
63
|
-
// in this case, we dont want to disable the camera
|
|
64
|
-
// this happens on foreground push notifications
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (call?.camera?.state.status === 'enabled') {
|
|
68
|
-
call?.camera?.disable();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
} else {
|
|
73
|
-
// shouldDisableIOSLocalVideoOnBackgroundRef is false, if local video is enabled on PiP
|
|
74
|
-
if (_shouldDisableIOSLocalVideoOnBackground.shouldDisableIOSLocalVideoOnBackgroundRef.current) {
|
|
75
|
-
if (call?.camera?.state.status === 'enabled') {
|
|
76
|
-
call?.camera?.disable();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
appState.current = nextAppState;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
return () => {
|
|
84
|
-
subscription.remove();
|
|
85
|
-
};
|
|
86
|
-
}, [call]);
|
|
87
|
-
return null;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* This is a renderless component to keep the call alive on Android device using useAndroidKeepCallAliveEffect.
|
|
92
|
-
* useAndroidKeepCallAliveEffect needs to called inside a child of StreamCallProvider.
|
|
93
|
-
*/
|
|
94
|
-
const AndroidKeepCallAlive = () => {
|
|
95
|
-
(0, _useAndroidKeepCallAliveEffect.useAndroidKeepCallAliveEffect)();
|
|
96
|
-
return null;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* This is a renderless component to end the call in callkeep for ios.
|
|
101
|
-
* useAndroidKeepCallAliveEffect needs to called inside a child of StreamCallProvider.
|
|
102
|
-
*/
|
|
103
|
-
const IosInformCallkeepCallEnd = () => {
|
|
104
|
-
(0, _useIosCallkeepWithCallingStateEffect.useIosCallkeepWithCallingStateEffect)();
|
|
105
|
-
return null;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* This is a renderless component to clear all push ws event subscriptions
|
|
110
|
-
* and set whether push ws subscriptions can be added or not.
|
|
111
|
-
*/
|
|
112
|
-
const ClearPushWSSubscriptions = () => {
|
|
113
|
-
(0, _react.useEffect)(() => {
|
|
114
|
-
(0, _utils.clearPushWSEventSubscriptions)();
|
|
115
|
-
_utils.canAddPushWSSubscriptionsRef.current = false;
|
|
116
|
-
return () => {
|
|
117
|
-
_utils.canAddPushWSSubscriptionsRef.current = true;
|
|
118
|
-
};
|
|
119
|
-
}, []);
|
|
120
|
-
return null;
|
|
121
|
-
};
|
|
122
|
-
const eventEmitter = _reactNative.NativeModules?.StreamVideoReactNative ? new _reactNative.NativeEventEmitter(_reactNative.NativeModules?.StreamVideoReactNative) : undefined;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* This is a renderless component to get the device stats like thermal state and power saver mode.
|
|
126
|
-
*/
|
|
127
|
-
const DeviceStats = () => {
|
|
128
|
-
const {
|
|
129
|
-
useCallCallingState
|
|
130
|
-
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
131
|
-
const callingState = useCallCallingState();
|
|
132
|
-
(0, _react.useEffect)(() => {
|
|
133
|
-
if (callingState !== _videoClient.CallingState.JOINED) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
_reactNative.NativeModules?.StreamVideoReactNative.isLowPowerModeEnabled().then(initialPowerMode => (0, _videoClient.setPowerState)(initialPowerMode));
|
|
137
|
-
let powerModeSubscription = eventEmitter?.addListener('isLowPowerModeEnabled', isLowPowerMode => (0, _videoClient.setPowerState)(isLowPowerMode));
|
|
138
|
-
_reactNative.NativeModules?.StreamVideoReactNative.currentThermalState().then(initialState => (0, _videoClient.setThermalState)(initialState));
|
|
139
|
-
let thermalStateSubscription = eventEmitter?.addListener('thermalStateDidChange', thermalState => (0, _videoClient.setThermalState)(thermalState));
|
|
140
|
-
|
|
141
|
-
// on android we need to explicitly start and stop the thermal status updates
|
|
142
|
-
if (_reactNative.Platform.OS === 'android') {
|
|
143
|
-
_reactNative.NativeModules?.StreamVideoReactNative.startThermalStatusUpdates();
|
|
144
|
-
}
|
|
145
|
-
return () => {
|
|
146
|
-
powerModeSubscription?.remove();
|
|
147
|
-
thermalStateSubscription?.remove();
|
|
148
|
-
if (_reactNative.Platform.OS === 'android') {
|
|
149
|
-
_reactNative.NativeModules?.StreamVideoReactNative.stopThermalStatusUpdates();
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
}, [callingState]);
|
|
153
|
-
return null;
|
|
154
|
-
};
|
|
155
|
-
//# sourceMappingURL=StreamCall.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_videoReactBindings","require","_react","_interopRequireWildcard","_videoClient","_useIosCallkeepWithCallingStateEffect","_utils","_useAndroidKeepCallAliveEffect","_reactNative","_shouldDisableIOSLocalVideoOnBackground","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","StreamCall","children","createElement","StreamCallProvider","AppStateListener","AndroidKeepCallAlive","IosInformCallkeepCallEnd","ClearPushWSSubscriptions","DeviceStats","exports","useCall","appState","useRef","AppState","currentState","useEffect","subscription","addEventListener","nextAppState","current","match","camera","state","status","Platform","OS","disable","then","enable","resume","NativeModules","StreamVideoReactNative","isInPiPMode","isInPiP","shouldDisableIOSLocalVideoOnBackgroundRef","remove","useAndroidKeepCallAliveEffect","useIosCallkeepWithCallingStateEffect","clearPushWSEventSubscriptions","canAddPushWSSubscriptionsRef","eventEmitter","NativeEventEmitter","undefined","useCallCallingState","useCallStateHooks","callingState","CallingState","JOINED","isLowPowerModeEnabled","initialPowerMode","setPowerState","powerModeSubscription","addListener","isLowPowerMode","currentThermalState","initialState","setThermalState","thermalStateSubscription","thermalState","startThermalStatusUpdates","stopThermalStatusUpdates"],"sourceRoot":"../../../src","sources":["providers/StreamCall.tsx"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAMA,IAAAI,qCAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAIA,IAAAM,8BAAA,GAAAN,OAAA;AACA,IAAAO,YA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AACE,YAAY,CACxD,CAAC;;IAED;IACA,IAAIlC,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;MAC7BK,0BAAa,EAAEC,sBAAsB,CAAC4B,yBAAyB,CAAC,CAAC;IACnE;IAEA,OAAO,MAAM;MACXR,qBAAqB,EAAEhB,MAAM,CAAC,CAAC;MAC/BsB,wBAAwB,EAAEtB,MAAM,CAAC,CAAC;MAClC,IAAIX,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;QAC7BK,0BAAa,EAAEC,sBAAsB,CAAC6B,wBAAwB,CAAC,CAAC;MAClE;IACF,CAAC;EACH,CAAC,EAAE,CAACf,YAAY,CAAC,CAAC;EAElB,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { StreamCallProvider, useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
2
|
-
import React, { useEffect, useRef } from 'react';
|
|
3
|
-
import { CallingState, setThermalState, setPowerState } from '@stream-io/video-client';
|
|
4
|
-
import { useIosCallkeepWithCallingStateEffect } from '../hooks/push/useIosCallkeepWithCallingStateEffect';
|
|
5
|
-
import { canAddPushWSSubscriptionsRef, clearPushWSEventSubscriptions } from '../utils/push/internal/utils';
|
|
6
|
-
import { useAndroidKeepCallAliveEffect } from '../hooks/useAndroidKeepCallAliveEffect';
|
|
7
|
-
import { AppState, NativeModules, Platform, NativeEventEmitter } from 'react-native';
|
|
8
|
-
import { shouldDisableIOSLocalVideoOnBackgroundRef } from '../utils/internal/shouldDisableIOSLocalVideoOnBackground';
|
|
9
|
-
/**
|
|
10
|
-
* StreamCall is a wrapper component that orchestrates the call life cycle logic and
|
|
11
|
-
* provides the call object to the children components.
|
|
12
|
-
* @param PropsWithChildren<StreamCallProps>
|
|
13
|
-
*
|
|
14
|
-
* @category Client State
|
|
15
|
-
*/
|
|
16
|
-
export const StreamCall = ({
|
|
17
|
-
call,
|
|
18
|
-
children
|
|
19
|
-
}) => {
|
|
20
|
-
return /*#__PURE__*/React.createElement(StreamCallProvider, {
|
|
21
|
-
call: call
|
|
22
|
-
}, /*#__PURE__*/React.createElement(AppStateListener, null), /*#__PURE__*/React.createElement(AndroidKeepCallAlive, null), /*#__PURE__*/React.createElement(IosInformCallkeepCallEnd, null), /*#__PURE__*/React.createElement(ClearPushWSSubscriptions, null), /*#__PURE__*/React.createElement(DeviceStats, null), children);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// Resume/Disable video stream tracks when app goes to background/foreground
|
|
26
|
-
// To save on CPU resources
|
|
27
|
-
const AppStateListener = () => {
|
|
28
|
-
const call = useCall();
|
|
29
|
-
const appState = useRef(AppState.currentState);
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
// due to strange behavior in iOS when app goes to "inactive" state
|
|
32
|
-
// we dont check for inactive states
|
|
33
|
-
// ref: https://www.reddit.com/r/reactnative/comments/15kib42/appstate_behavior_in_ios_when_swiping_down_to/
|
|
34
|
-
const subscription = AppState.addEventListener('change', nextAppState => {
|
|
35
|
-
if (appState.current.match(/background/) && nextAppState === 'active') {
|
|
36
|
-
if (call?.camera?.state.status === 'enabled' && Platform.OS === 'android') {
|
|
37
|
-
// when device is locked and resumed, the status isnt made disabled but stays enabled
|
|
38
|
-
// as a workaround we stop the track and enable again if its already in enabled state
|
|
39
|
-
call?.camera?.disable(true).then(() => {
|
|
40
|
-
call?.camera?.enable();
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
call?.camera?.resume();
|
|
44
|
-
}
|
|
45
|
-
appState.current = nextAppState;
|
|
46
|
-
} else if (appState.current === 'active' && nextAppState.match(/background/)) {
|
|
47
|
-
if (Platform.OS === 'android') {
|
|
48
|
-
// in Android, we need to check if we are in PiP mode
|
|
49
|
-
// in PiP mode, we don't want to disable the camera
|
|
50
|
-
NativeModules?.StreamVideoReactNative?.isInPiPMode().then(isInPiP => {
|
|
51
|
-
if (!isInPiP) {
|
|
52
|
-
if (AppState.currentState === 'active') {
|
|
53
|
-
// this is to handle the case that the app became active as soon as it went to background
|
|
54
|
-
// in this case, we dont want to disable the camera
|
|
55
|
-
// this happens on foreground push notifications
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (call?.camera?.state.status === 'enabled') {
|
|
59
|
-
call?.camera?.disable();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
} else {
|
|
64
|
-
// shouldDisableIOSLocalVideoOnBackgroundRef is false, if local video is enabled on PiP
|
|
65
|
-
if (shouldDisableIOSLocalVideoOnBackgroundRef.current) {
|
|
66
|
-
if (call?.camera?.state.status === 'enabled') {
|
|
67
|
-
call?.camera?.disable();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
appState.current = nextAppState;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
return () => {
|
|
75
|
-
subscription.remove();
|
|
76
|
-
};
|
|
77
|
-
}, [call]);
|
|
78
|
-
return null;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* This is a renderless component to keep the call alive on Android device using useAndroidKeepCallAliveEffect.
|
|
83
|
-
* useAndroidKeepCallAliveEffect needs to called inside a child of StreamCallProvider.
|
|
84
|
-
*/
|
|
85
|
-
const AndroidKeepCallAlive = () => {
|
|
86
|
-
useAndroidKeepCallAliveEffect();
|
|
87
|
-
return null;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* This is a renderless component to end the call in callkeep for ios.
|
|
92
|
-
* useAndroidKeepCallAliveEffect needs to called inside a child of StreamCallProvider.
|
|
93
|
-
*/
|
|
94
|
-
const IosInformCallkeepCallEnd = () => {
|
|
95
|
-
useIosCallkeepWithCallingStateEffect();
|
|
96
|
-
return null;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* This is a renderless component to clear all push ws event subscriptions
|
|
101
|
-
* and set whether push ws subscriptions can be added or not.
|
|
102
|
-
*/
|
|
103
|
-
const ClearPushWSSubscriptions = () => {
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
clearPushWSEventSubscriptions();
|
|
106
|
-
canAddPushWSSubscriptionsRef.current = false;
|
|
107
|
-
return () => {
|
|
108
|
-
canAddPushWSSubscriptionsRef.current = true;
|
|
109
|
-
};
|
|
110
|
-
}, []);
|
|
111
|
-
return null;
|
|
112
|
-
};
|
|
113
|
-
const eventEmitter = NativeModules?.StreamVideoReactNative ? new NativeEventEmitter(NativeModules?.StreamVideoReactNative) : undefined;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* This is a renderless component to get the device stats like thermal state and power saver mode.
|
|
117
|
-
*/
|
|
118
|
-
const DeviceStats = () => {
|
|
119
|
-
const {
|
|
120
|
-
useCallCallingState
|
|
121
|
-
} = useCallStateHooks();
|
|
122
|
-
const callingState = useCallCallingState();
|
|
123
|
-
useEffect(() => {
|
|
124
|
-
if (callingState !== CallingState.JOINED) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
NativeModules?.StreamVideoReactNative.isLowPowerModeEnabled().then(initialPowerMode => setPowerState(initialPowerMode));
|
|
128
|
-
let powerModeSubscription = eventEmitter?.addListener('isLowPowerModeEnabled', isLowPowerMode => setPowerState(isLowPowerMode));
|
|
129
|
-
NativeModules?.StreamVideoReactNative.currentThermalState().then(initialState => setThermalState(initialState));
|
|
130
|
-
let thermalStateSubscription = eventEmitter?.addListener('thermalStateDidChange', thermalState => setThermalState(thermalState));
|
|
131
|
-
|
|
132
|
-
// on android we need to explicitly start and stop the thermal status updates
|
|
133
|
-
if (Platform.OS === 'android') {
|
|
134
|
-
NativeModules?.StreamVideoReactNative.startThermalStatusUpdates();
|
|
135
|
-
}
|
|
136
|
-
return () => {
|
|
137
|
-
powerModeSubscription?.remove();
|
|
138
|
-
thermalStateSubscription?.remove();
|
|
139
|
-
if (Platform.OS === 'android') {
|
|
140
|
-
NativeModules?.StreamVideoReactNative.stopThermalStatusUpdates();
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}, [callingState]);
|
|
144
|
-
return null;
|
|
145
|
-
};
|
|
146
|
-
//# sourceMappingURL=StreamCall.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StreamCallProvider","useCall","useCallStateHooks","React","useEffect","useRef","CallingState","setThermalState","setPowerState","useIosCallkeepWithCallingStateEffect","canAddPushWSSubscriptionsRef","clearPushWSEventSubscriptions","useAndroidKeepCallAliveEffect","AppState","NativeModules","Platform","NativeEventEmitter","shouldDisableIOSLocalVideoOnBackgroundRef","StreamCall","call","children","createElement","AppStateListener","AndroidKeepCallAlive","IosInformCallkeepCallEnd","ClearPushWSSubscriptions","DeviceStats","appState","currentState","subscription","addEventListener","nextAppState","current","match","camera","state","status","OS","disable","then","enable","resume","StreamVideoReactNative","isInPiPMode","isInPiP","remove","eventEmitter","undefined","useCallCallingState","callingState","JOINED","isLowPowerModeEnabled","initialPowerMode","powerModeSubscription","addListener","isLowPowerMode","currentThermalState","initialState","thermalStateSubscription","thermalState","startThermalStatusUpdates","stopThermalStatusUpdates"],"sourceRoot":"../../../src","sources":["providers/StreamCall.tsx"],"mappings":"AAAA,SACEA,kBAAkB,EAClBC,OAAO,EACPC,iBAAiB,QACZ,iCAAiC;AACxC,OAAOC,KAAK,IAAuBC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACnE,SAEEC,YAAY,EACZC,eAAe,EACfC,aAAa,QACR,yBAAyB;AAChC,SAASC,oCAAoC,QAAQ,oDAAoD;AACzG,SACEC,4BAA4B,EAC5BC,6BAA6B,QACxB,8BAA8B;AACrC,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SACEC,QAAQ,EACRC,aAAa,EACbC,QAAQ,EACRC,kBAAkB,QACb,cAAc;AACrB,SAASC,yCAAyC,QAAQ,0DAA0D;AASpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAGA,CAAC;EACzBC,IA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