@whereby.com/browser-sdk 3.9.11 → 3.10.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.
@@ -27,10 +27,14 @@ function _interopNamespaceDefault(e) {
27
27
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
28
28
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(PopoverPrimitive);
29
29
 
30
+ const WherebyContext = React__namespace.createContext(null);
31
+ reactRedux.createStoreHook(WherebyContext);
32
+ const useDispatch = reactRedux.createDispatchHook(WherebyContext);
33
+ const useSelector = reactRedux.createSelectorHook(WherebyContext);
30
34
  function Provider({ children }) {
31
35
  const services = core.createServices();
32
36
  const store = core.createStore({ injectServices: services });
33
- return React__namespace.createElement(reactRedux.Provider, { store: store }, children);
37
+ return (React__namespace.createElement(reactRedux.Provider, { context: WherebyContext, store: store }, children));
34
38
  }
35
39
 
36
40
  /******************************************************************************
@@ -67,8 +71,8 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
67
71
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
68
72
  };
69
73
 
70
- const useAppDispatch = reactRedux.useDispatch.withTypes();
71
- const useAppSelector = reactRedux.useSelector.withTypes();
74
+ const useAppDispatch = useDispatch.withTypes();
75
+ const useAppSelector = useSelector.withTypes();
72
76
 
73
77
  const VideoView = React__namespace.forwardRef((_a, ref) => {
74
78
  var { muted, mirror = false, stream, onVideoResize } = _a, rest = __rest(_a, ["muted", "mirror", "stream", "onVideoResize"]);
@@ -168,7 +172,7 @@ const selectRoomConnectionState = toolkit.createSelector(core.selectChatMessages
168
172
  return state;
169
173
  });
170
174
 
171
- const browserSdkVersion = "3.9.11";
175
+ const browserSdkVersion = "3.10.0";
172
176
 
173
177
  const defaultRoomConnectionOptions = {
174
178
  localMediaOptions: {
@@ -2159,9 +2163,9 @@ const GridVideoView = React__namespace.forwardRef((_a, ref) => {
2159
2163
  }, [clientAspectRatios, participant.id, onSetClientAspectRatio]);
2160
2164
  const s = stream || participant.stream;
2161
2165
  if (!s) {
2162
- return null;
2166
+ return (React__namespace.createElement(VideoMutedIndicator, { isSmallCell: false, displayName: (participant === null || participant === void 0 ? void 0 : participant.displayName) || "Guest", withRoundedCorners: true }));
2163
2167
  }
2164
- return (React__namespace.createElement(VideoView, Object.assign({ ref: videoEl, style: Object.assign(Object.assign({ borderRadius: isConstrained ? 0 : "8px" }, (isConstrained ? { objectFit: "cover" } : {})), style) }, rest, { stream: s, onVideoResize: handleResize })));
2168
+ return (React__namespace.createElement(VideoView, Object.assign({ ref: videoEl, style: Object.assign(Object.assign({ borderRadius: isConstrained ? 0 : "8px" }, (isConstrained ? { objectFit: "cover" } : {})), style), muted: participant.isLocalClient }, rest, { stream: s, onVideoResize: handleResize })));
2165
2169
  });
2166
2170
  GridVideoView.displayName = "GridVideoView";
2167
2171
  function renderCellView({ cellView, enableParticipantMenu, render }) {
@@ -1,14 +1,18 @@
1
1
  import * as React from 'react';
2
- import { Provider as Provider$1, useDispatch, useSelector } from 'react-redux';
2
+ import { createStoreHook, createDispatchHook, createSelectorHook, Provider as Provider$1 } from 'react-redux';
3
3
  import { createServices, createStore, selectCurrentSpeakerDeviceId, debounce, doRtcReportStreamResolution, selectChatMessages, selectCloudRecordingRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, doAppStop, doSendChatMessage, doKnockRoom, doSetDisplayName, toggleCameraEnabled, toggleMicrophoneEnabled, toggleLowDataModeEnabled, doSetLocalStickyReaction, doRequestAudioEnable, doRequestVideoEnable, doAcceptWaitingParticipant, doRejectWaitingParticipant, doStartCloudRecording, doStartScreenshare, doStopCloudRecording, doStopScreenshare, doAppStart, doLockRoom, doSpotlightParticipant, doRemoveSpotlight, doKickParticipant, doEndMeeting, selectCameraDeviceError, selectCameraDevices, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsLocalMediaStarting, selectMicrophoneDeviceError, selectMicrophoneDevices, selectSpeakerDevices, selectLocalMediaStartError, doStartLocalMedia, doStopLocalMedia, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, selectAllClientViews, selectNumParticipants } from '@whereby.com/core';
4
4
  import { createSelector } from '@reduxjs/toolkit';
5
5
  import runes from 'runes';
6
6
  import * as PopoverPrimitive from '@radix-ui/react-popover';
7
7
 
8
+ const WherebyContext = React.createContext(null);
9
+ createStoreHook(WherebyContext);
10
+ const useDispatch = createDispatchHook(WherebyContext);
11
+ const useSelector = createSelectorHook(WherebyContext);
8
12
  function Provider({ children }) {
9
13
  const services = createServices();
10
14
  const store = createStore({ injectServices: services });
11
- return React.createElement(Provider$1, { store: store }, children);
15
+ return (React.createElement(Provider$1, { context: WherebyContext, store: store }, children));
12
16
  }
13
17
 
14
18
  /******************************************************************************
@@ -146,7 +150,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectCloud
146
150
  return state;
147
151
  });
148
152
 
149
- const browserSdkVersion = "3.9.11";
153
+ const browserSdkVersion = "3.10.0";
150
154
 
151
155
  const defaultRoomConnectionOptions = {
152
156
  localMediaOptions: {
@@ -2137,9 +2141,9 @@ const GridVideoView = React.forwardRef((_a, ref) => {
2137
2141
  }, [clientAspectRatios, participant.id, onSetClientAspectRatio]);
2138
2142
  const s = stream || participant.stream;
2139
2143
  if (!s) {
2140
- return null;
2144
+ return (React.createElement(VideoMutedIndicator, { isSmallCell: false, displayName: (participant === null || participant === void 0 ? void 0 : participant.displayName) || "Guest", withRoundedCorners: true }));
2141
2145
  }
2142
- return (React.createElement(VideoView, Object.assign({ ref: videoEl, style: Object.assign(Object.assign({ borderRadius: isConstrained ? 0 : "8px" }, (isConstrained ? { objectFit: "cover" } : {})), style) }, rest, { stream: s, onVideoResize: handleResize })));
2146
+ return (React.createElement(VideoView, Object.assign({ ref: videoEl, style: Object.assign(Object.assign({ borderRadius: isConstrained ? 0 : "8px" }, (isConstrained ? { objectFit: "cover" } : {})), style), muted: participant.isLocalClient }, rest, { stream: s, onVideoResize: handleResize })));
2143
2147
  });
2144
2148
  GridVideoView.displayName = "GridVideoView";
2145
2149
  function renderCellView({ cellView, enableParticipantMenu, render }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whereby.com/browser-sdk",
3
- "version": "3.9.11",
3
+ "version": "3.10.0",
4
4
  "description": "Modules for integration Whereby video in web apps",
5
5
  "author": "Whereby AS",
6
6
  "license": "MIT",
@@ -80,7 +80,7 @@
80
80
  "dependencies": {
81
81
  "@radix-ui/react-popover": "^1.0.7",
82
82
  "@reduxjs/toolkit": "^2.2.3",
83
- "@whereby.com/core": "0.29.0",
83
+ "@whereby.com/core": "0.29.1",
84
84
  "clsx": "^2.1.1",
85
85
  "heresy": "^1.0.4",
86
86
  "react-redux": "^9.1.1",