@stream-io/video-react-sdk 0.4.19 → 0.4.21

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": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",
@@ -31,8 +31,8 @@
31
31
  "@floating-ui/react": "^0.26.1",
32
32
  "@nivo/core": "^0.80.0",
33
33
  "@nivo/line": "^0.80.0",
34
- "@stream-io/video-client": "^0.5.5",
35
- "@stream-io/video-react-bindings": "^0.3.16",
34
+ "@stream-io/video-client": "^0.5.6",
35
+ "@stream-io/video-react-bindings": "^0.3.17",
36
36
  "clsx": "^2.0.0",
37
37
  "prop-types": "^15.8.1"
38
38
  },
@@ -221,6 +221,18 @@ export const ParticipantActionsContextMenu = ({
221
221
  .finally(() => setFullscreenModeOn(false));
222
222
  };
223
223
 
224
+ useEffect(() => {
225
+ // handles the case when fullscreen mode is toggled externally,
226
+ // e.g., by pressing ESC key or some other keyboard shortcut
227
+ const handleFullscreenChange = () => {
228
+ setFullscreenModeOn(!!document.fullscreenElement);
229
+ };
230
+ document.addEventListener('fullscreenchange', handleFullscreenChange);
231
+ return () => {
232
+ document.removeEventListener('fullscreenchange', handleFullscreenChange);
233
+ };
234
+ }, []);
235
+
224
236
  useEffect(() => {
225
237
  if (!videoElement) return;
226
238