@stream-io/video-react-sdk 1.7.5 → 1.7.7

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 CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.7.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.7.6...@stream-io/video-react-sdk-1.7.7) (2024-11-01)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@stream-io/video-client` updated to version `1.10.2`
10
+ * `@stream-io/video-react-bindings` updated to version `1.1.12`
11
+ ## [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)
12
+
13
+ ### Dependency Updates
14
+
15
+ * `@stream-io/video-react-bindings` updated to version `1.1.11`
16
+
17
+ ### Bug Fixes
18
+
19
+ * 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))
20
+
5
21
  ## [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
22
 
7
23
  ### 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.5").split('.');
2532
+ const [major, minor, patch] = ("1.7.7").split('.');
2566
2533
  videoClient.setSdkInfo({
2567
2534
  type: videoClient.SfuModels.SdkType.REACT,
2568
2535
  major,