@stream-io/video-react-sdk 1.12.6 → 1.12.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "1.12.6",
3
+ "version": "1.12.8",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",
@@ -31,9 +31,9 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@floating-ui/react": "^0.26.24",
34
- "@stream-io/video-client": "1.18.3",
34
+ "@stream-io/video-client": "1.18.5",
35
35
  "@stream-io/video-filters-web": "0.1.7",
36
- "@stream-io/video-react-bindings": "1.5.5",
36
+ "@stream-io/video-react-bindings": "1.5.7",
37
37
  "chart.js": "^4.4.4",
38
38
  "clsx": "^2.0.0",
39
39
  "react-chartjs-2": "^5.3.0"
@@ -30,8 +30,12 @@ export const ToggleAudioPreviewButton = (
30
30
  const { caption, onMenuToggle, ...restCompositeButtonProps } = props;
31
31
  const { t } = useI18n();
32
32
  const { useMicrophoneState } = useCallStateHooks();
33
- const { microphone, optimisticIsMute, hasBrowserPermission } =
34
- useMicrophoneState();
33
+ const {
34
+ microphone,
35
+ optimisticIsMute,
36
+ hasBrowserPermission,
37
+ isPromptingPermission,
38
+ } = useMicrophoneState();
35
39
  const [tooltipDisabled, setTooltipDisabled] = useState(false);
36
40
  const handleClick = createCallControlHandler(props, () =>
37
41
  microphone.toggle(),
@@ -74,6 +78,13 @@ export const ToggleAudioPreviewButton = (
74
78
  children="!"
75
79
  />
76
80
  )}
81
+ {isPromptingPermission && (
82
+ <span
83
+ className="str-video__pending-permission"
84
+ title={t('Waiting for permission')}
85
+ children="?"
86
+ />
87
+ )}
77
88
  </CompositeButton>
78
89
  </WithTooltip>
79
90
  );
@@ -102,8 +113,12 @@ export const ToggleAudioPublishingButton = (
102
113
  useRequestPermission(OwnCapability.SEND_AUDIO);
103
114
 
104
115
  const { useMicrophoneState } = useCallStateHooks();
105
- const { microphone, optimisticIsMute, hasBrowserPermission } =
106
- useMicrophoneState();
116
+ const {
117
+ microphone,
118
+ optimisticIsMute,
119
+ hasBrowserPermission,
120
+ isPromptingPermission,
121
+ } = useMicrophoneState();
107
122
  const [tooltipDisabled, setTooltipDisabled] = useState(false);
108
123
  const handleClick = createCallControlHandler(props, async () => {
109
124
  if (!hasPermission) {
@@ -154,6 +169,14 @@ export const ToggleAudioPublishingButton = (
154
169
  {(!hasBrowserPermission || !hasPermission) && (
155
170
  <span className="str-video__no-media-permission">!</span>
156
171
  )}
172
+ {isPromptingPermission && (
173
+ <span
174
+ className="str-video__pending-permission"
175
+ title={t('Waiting for permission')}
176
+ >
177
+ ?
178
+ </span>
179
+ )}
157
180
  </CompositeButton>
158
181
  </WithTooltip>
159
182
  </PermissionNotification>
@@ -36,7 +36,12 @@ export const ToggleVideoPreviewButton = (
36
36
  } = props;
37
37
  const { t } = useI18n();
38
38
  const { useCameraState } = useCallStateHooks();
39
- const { camera, optimisticIsMute, hasBrowserPermission } = useCameraState();
39
+ const {
40
+ camera,
41
+ optimisticIsMute,
42
+ hasBrowserPermission,
43
+ isPromptingPermission,
44
+ } = useCameraState();
40
45
  const [tooltipDisabled, setTooltipDisabled] = useState(false);
41
46
  const handleClick = createCallControlHandler(props, () => camera.toggle());
42
47
 
@@ -79,6 +84,13 @@ export const ToggleVideoPreviewButton = (
79
84
  children="!"
80
85
  />
81
86
  )}
87
+ {isPromptingPermission && (
88
+ <span
89
+ className="str-video__pending-permission"
90
+ title={t('Waiting for permission')}
91
+ children="?"
92
+ />
93
+ )}
82
94
  </CompositeButton>
83
95
  </WithTooltip>
84
96
  );
@@ -107,7 +119,12 @@ export const ToggleVideoPublishingButton = (
107
119
  useRequestPermission(OwnCapability.SEND_VIDEO);
108
120
 
109
121
  const { useCameraState, useCallSettings } = useCallStateHooks();
110
- const { camera, optimisticIsMute, hasBrowserPermission } = useCameraState();
122
+ const {
123
+ camera,
124
+ optimisticIsMute,
125
+ hasBrowserPermission,
126
+ isPromptingPermission,
127
+ } = useCameraState();
111
128
  const callSettings = useCallSettings();
112
129
  const isPublishingVideoAllowed = callSettings?.video.enabled;
113
130
  const [tooltipDisabled, setTooltipDisabled] = useState(false);
@@ -170,6 +187,14 @@ export const ToggleVideoPublishingButton = (
170
187
  !isPublishingVideoAllowed) && (
171
188
  <span className="str-video__no-media-permission">!</span>
172
189
  )}
190
+ {isPromptingPermission && (
191
+ <span
192
+ className="str-video__pending-permission"
193
+ title={t('Waiting for permission')}
194
+ >
195
+ ?
196
+ </span>
197
+ )}
173
198
  </CompositeButton>
174
199
  </WithTooltip>
175
200
  </PermissionNotification>
@@ -171,13 +171,14 @@ export const ParticipantActionsContextMenu = () => {
171
171
  </GenericMenuButtonItem>
172
172
  )}
173
173
  </Restricted>
174
- {participantViewElement && (
175
- <GenericMenuButtonItem onClick={toggleFullscreenMode}>
176
- {t('{{ direction }} fullscreen', {
177
- direction: fullscreenModeOn ? t('Leave') : t('Enter'),
178
- })}
179
- </GenericMenuButtonItem>
180
- )}
174
+ {participantViewElement &&
175
+ typeof participantViewElement.requestFullscreen !== 'undefined' && (
176
+ <GenericMenuButtonItem onClick={toggleFullscreenMode}>
177
+ {t('{{ direction }} fullscreen', {
178
+ direction: fullscreenModeOn ? t('Leave') : t('Enter'),
179
+ })}
180
+ </GenericMenuButtonItem>
181
+ )}
181
182
  {videoElement && document.pictureInPictureEnabled && (
182
183
  <GenericMenuButtonItem onClick={togglePictureInPicture}>
183
184
  {t('{{ direction }} picture-in-picture', {