@stream-io/video-react-sdk 1.7.5 → 1.7.6
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 +10 -0
- package/dist/index.cjs.js +5 -38
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -35
- package/dist/index.es.js.map +1 -1
- package/dist/src/hooks/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/components/CallControls/RecordCallButton.tsx +5 -2
- package/src/components/Notification/RecordingInProgressNotification.tsx +4 -2
- package/src/hooks/index.ts +0 -1
- package/dist/src/hooks/useToggleCallRecording.d.ts +0 -5
- package/src/hooks/useToggleCallRecording.ts +0 -36
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.7.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.7.5...@stream-io/video-react-sdk-1.7.6) (2024-11-01)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-react-bindings` updated to version `1.1.11`
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* move useToggleCallRecording to react-bindings ([#1545](https://github.com/GetStream/stream-video-js/issues/1545)) ([73014ca](https://github.com/GetStream/stream-video-js/commit/73014ca6a4585680f581c4e9481c2d286f2fcd37))
|
|
14
|
+
|
|
5
15
|
## [1.7.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.7.4...@stream-io/video-react-sdk-1.7.5) (2024-10-30)
|
|
6
16
|
|
|
7
17
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -245,39 +245,6 @@ const useHorizontalScrollPosition = (scrollElement, threshold = SCROLL_THRESHOLD
|
|
|
245
245
|
return scrollPosition;
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
const useToggleCallRecording = () => {
|
|
249
|
-
const call = videoReactBindings.useCall();
|
|
250
|
-
const { useIsCallRecordingInProgress } = videoReactBindings.useCallStateHooks();
|
|
251
|
-
const isCallRecordingInProgress = useIsCallRecordingInProgress();
|
|
252
|
-
const [isAwaitingResponse, setIsAwaitingResponse] = react.useState(false);
|
|
253
|
-
// TODO: add permissions
|
|
254
|
-
react.useEffect(() => {
|
|
255
|
-
// we wait until call.recording_started/stopped event to flips the
|
|
256
|
-
// `isCallRecordingInProgress` state variable.
|
|
257
|
-
// Once the flip happens, we remove the loading indicator
|
|
258
|
-
setIsAwaitingResponse((isAwaiting) => {
|
|
259
|
-
if (isAwaiting)
|
|
260
|
-
return false;
|
|
261
|
-
return isAwaiting;
|
|
262
|
-
});
|
|
263
|
-
}, [isCallRecordingInProgress]);
|
|
264
|
-
const toggleCallRecording = react.useCallback(async () => {
|
|
265
|
-
try {
|
|
266
|
-
setIsAwaitingResponse(true);
|
|
267
|
-
if (isCallRecordingInProgress) {
|
|
268
|
-
await call?.stopRecording();
|
|
269
|
-
}
|
|
270
|
-
else {
|
|
271
|
-
await call?.startRecording();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
catch (e) {
|
|
275
|
-
console.error(`Failed start recording`, e);
|
|
276
|
-
}
|
|
277
|
-
}, [call, isCallRecordingInProgress]);
|
|
278
|
-
return { toggleCallRecording, isAwaitingResponse, isCallRecordingInProgress };
|
|
279
|
-
};
|
|
280
|
-
|
|
281
248
|
const useRequestPermission = (permission) => {
|
|
282
249
|
const call = videoReactBindings.useCall();
|
|
283
250
|
const { useHasPermissions } = videoReactBindings.useCallStateHooks();
|
|
@@ -930,7 +897,7 @@ const SpeakingWhileMutedNotification = ({ children, text, placement, }) => {
|
|
|
930
897
|
|
|
931
898
|
const RecordingInProgressNotification = ({ children, text, }) => {
|
|
932
899
|
const { t } = videoReactBindings.useI18n();
|
|
933
|
-
const { isCallRecordingInProgress } = useToggleCallRecording();
|
|
900
|
+
const { isCallRecordingInProgress } = videoReactBindings.useToggleCallRecording();
|
|
934
901
|
const [isVisible, setVisible] = react.useState(false);
|
|
935
902
|
const message = text ?? t('Recording in progress...');
|
|
936
903
|
react.useEffect(() => {
|
|
@@ -990,7 +957,7 @@ const WithTooltip = ({ title, tooltipClassName, tooltipPlacement, tooltipDisable
|
|
|
990
957
|
|
|
991
958
|
const RecordEndConfirmation = () => {
|
|
992
959
|
const { t } = videoReactBindings.useI18n();
|
|
993
|
-
const { toggleCallRecording, isAwaitingResponse } = useToggleCallRecording();
|
|
960
|
+
const { toggleCallRecording, isAwaitingResponse } = videoReactBindings.useToggleCallRecording();
|
|
994
961
|
const { close } = useMenuContext();
|
|
995
962
|
return (jsxRuntime.jsxs("div", { className: "str-video__end-recording__confirmation", children: [jsxRuntime.jsxs("div", { className: "str-video__end-recording__header", children: [jsxRuntime.jsx(Icon, { icon: "recording-on" }), jsxRuntime.jsx("h2", { className: "str-video__end-recording__heading", children: t('End recording') })] }), jsxRuntime.jsx("p", { className: "str-video__end-recording__description", children: t('Are you sure you want end the recording?') }), jsxRuntime.jsxs("div", { className: "str-video__end-recording__actions", children: [jsxRuntime.jsx(CompositeButton, { variant: "secondary", onClick: close, children: t('Cancel') }), jsxRuntime.jsx(CompositeButton, { variant: "primary", onClick: toggleCallRecording, children: isAwaitingResponse ? jsxRuntime.jsx(LoadingIndicator, {}) : t('End recording') })] })] }));
|
|
996
963
|
};
|
|
@@ -999,7 +966,7 @@ const ToggleEndRecordingMenuButton = react.forwardRef(function ToggleEndRecordin
|
|
|
999
966
|
});
|
|
1000
967
|
const RecordCallConfirmationButton = ({ caption, }) => {
|
|
1001
968
|
const { t } = videoReactBindings.useI18n();
|
|
1002
|
-
const { toggleCallRecording, isAwaitingResponse, isCallRecordingInProgress } = useToggleCallRecording();
|
|
969
|
+
const { toggleCallRecording, isAwaitingResponse, isCallRecordingInProgress } = videoReactBindings.useToggleCallRecording();
|
|
1003
970
|
if (isCallRecordingInProgress) {
|
|
1004
971
|
return (jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [
|
|
1005
972
|
videoClient.OwnCapability.START_RECORD_CALL,
|
|
@@ -1016,7 +983,7 @@ const RecordCallConfirmationButton = ({ caption, }) => {
|
|
|
1016
983
|
};
|
|
1017
984
|
const RecordCallButton = ({ caption }) => {
|
|
1018
985
|
const { t } = videoReactBindings.useI18n();
|
|
1019
|
-
const { toggleCallRecording, isAwaitingResponse, isCallRecordingInProgress } = useToggleCallRecording();
|
|
986
|
+
const { toggleCallRecording, isAwaitingResponse, isCallRecordingInProgress } = videoReactBindings.useToggleCallRecording();
|
|
1020
987
|
let title = caption ?? t('Record call');
|
|
1021
988
|
if (isAwaitingResponse) {
|
|
1022
989
|
title = isCallRecordingInProgress
|
|
@@ -2562,7 +2529,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2562
2529
|
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2563
2530
|
};
|
|
2564
2531
|
|
|
2565
|
-
const [major, minor, patch] = ("1.7.
|
|
2532
|
+
const [major, minor, patch] = ("1.7.6").split('.');
|
|
2566
2533
|
videoClient.setSdkInfo({
|
|
2567
2534
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2568
2535
|
major,
|