@whereby.com/browser-sdk 3.8.2 → 3.9.1
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/dist/cdn/v3-embed.js +7 -7
- package/dist/cdn/v3-react.js +2 -2
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.esm.js +25 -29
- package/package.json +2 -2
package/dist/react/index.d.ts
CHANGED
|
@@ -114,12 +114,14 @@ interface RoomConnectionActions {
|
|
|
114
114
|
toggleLowDataMode: (enabled?: boolean) => void;
|
|
115
115
|
toggleRaiseHand: (enabled?: boolean) => void;
|
|
116
116
|
askToSpeak: (participantId: string) => void;
|
|
117
|
+
askToTurnOnCamera: (participantId: string) => void;
|
|
117
118
|
acceptWaitingParticipant: (participantId: string) => void;
|
|
118
119
|
knock: () => void;
|
|
119
120
|
joinRoom: () => void;
|
|
120
121
|
leaveRoom: () => void;
|
|
121
122
|
lockRoom: (locked: boolean) => void;
|
|
122
123
|
muteParticipants: (clientIds: string[]) => void;
|
|
124
|
+
turnOffParticipantCameras: (clientIds: string[]) => void;
|
|
123
125
|
kickParticipant: (clientId: string) => void;
|
|
124
126
|
endMeeting: (stayBehind?: boolean) => void;
|
|
125
127
|
rejectWaitingParticipant: (participantId: string) => void;
|
package/dist/react/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Provider as Provider$1, useDispatch, useSelector } from 'react-redux';
|
|
3
|
-
import { createServices, createStore, selectCurrentSpeakerDeviceId, debounce, doRtcReportStreamResolution, selectChatMessages, selectCloudRecordingRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, doAppStop, doSendChatMessage, doKnockRoom, toggleCameraEnabled, toggleMicrophoneEnabled, toggleLowDataModeEnabled, doSetLocalStickyReaction, doRequestAudioEnable, doAcceptWaitingParticipant, doRejectWaitingParticipant, doStartCloudRecording, doStartScreenshare, doStopCloudRecording, doStopScreenshare, doAppStart, doLockRoom, doSpotlightParticipant, doRemoveSpotlight, doKickParticipant, doEndMeeting,
|
|
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';
|
|
@@ -146,7 +146,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectCloud
|
|
|
146
146
|
return state;
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
const browserSdkVersion = "3.
|
|
149
|
+
const browserSdkVersion = "3.9.1";
|
|
150
150
|
|
|
151
151
|
const defaultRoomConnectionOptions = {
|
|
152
152
|
localMediaOptions: {
|
|
@@ -175,36 +175,30 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
175
175
|
dispatch(doAppStop());
|
|
176
176
|
};
|
|
177
177
|
}, []);
|
|
178
|
-
const
|
|
179
|
-
if (roomConnectionState.connectionStatus === "connected") {
|
|
180
|
-
dispatch(actionCreator());
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
console.warn("Action cannot be performed outside of a connected room");
|
|
184
|
-
}
|
|
185
|
-
}, [roomConnectionState.connectionStatus, dispatch]);
|
|
186
|
-
const sendChatMessage = React.useCallback((text) => whenConnectedToRoom(() => doSendChatMessage({ text })), [whenConnectedToRoom]);
|
|
178
|
+
const sendChatMessage = React.useCallback((text) => dispatch(doSendChatMessage({ text })), [dispatch]);
|
|
187
179
|
const knock = React.useCallback(() => dispatch(doKnockRoom()), [dispatch]);
|
|
188
|
-
const setDisplayName = (displayName) =>
|
|
189
|
-
const toggleCamera = React.useCallback((enabled) =>
|
|
190
|
-
const toggleMicrophone = React.useCallback((enabled) =>
|
|
191
|
-
const toggleLowDataMode = React.useCallback((enabled) =>
|
|
192
|
-
const toggleRaiseHand = React.useCallback((enabled) =>
|
|
193
|
-
const askToSpeak = React.useCallback((participantId) =>
|
|
194
|
-
const
|
|
195
|
-
const
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
const
|
|
199
|
-
const
|
|
180
|
+
const setDisplayName = React.useCallback((displayName) => dispatch(doSetDisplayName({ displayName })), [dispatch]);
|
|
181
|
+
const toggleCamera = React.useCallback((enabled) => dispatch(toggleCameraEnabled({ enabled })), [dispatch]);
|
|
182
|
+
const toggleMicrophone = React.useCallback((enabled) => dispatch(toggleMicrophoneEnabled({ enabled })), [dispatch]);
|
|
183
|
+
const toggleLowDataMode = React.useCallback((enabled) => dispatch(toggleLowDataModeEnabled({ enabled })), [dispatch]);
|
|
184
|
+
const toggleRaiseHand = React.useCallback((enabled) => dispatch(doSetLocalStickyReaction({ enabled })), [dispatch]);
|
|
185
|
+
const askToSpeak = React.useCallback((participantId) => dispatch(doRequestAudioEnable({ clientIds: [participantId], enable: true })), [dispatch]);
|
|
186
|
+
const askToTurnOnCamera = React.useCallback((participantId) => dispatch(doRequestVideoEnable({ clientIds: [participantId], enable: true })), [dispatch]);
|
|
187
|
+
const acceptWaitingParticipant = React.useCallback((participantId) => dispatch(doAcceptWaitingParticipant({ participantId })), [dispatch]);
|
|
188
|
+
const rejectWaitingParticipant = React.useCallback((participantId) => dispatch(doRejectWaitingParticipant({ participantId })), [dispatch]);
|
|
189
|
+
const startCloudRecording = React.useCallback(() => dispatch(doStartCloudRecording()), [dispatch]);
|
|
190
|
+
const startScreenshare = React.useCallback(() => dispatch(doStartScreenshare()), [dispatch]);
|
|
191
|
+
const stopCloudRecording = React.useCallback(() => dispatch(doStopCloudRecording()), [dispatch]);
|
|
192
|
+
const stopScreenshare = React.useCallback(() => dispatch(doStopScreenshare()), [dispatch]);
|
|
200
193
|
const joinRoom = React.useCallback(() => dispatch(doAppStart(roomConfig)), [dispatch]);
|
|
201
194
|
const leaveRoom = React.useCallback(() => dispatch(doAppStop()), [dispatch]);
|
|
202
|
-
const lockRoom = React.useCallback((locked) =>
|
|
203
|
-
const muteParticipants = React.useCallback((participantIds) =>
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
const
|
|
195
|
+
const lockRoom = React.useCallback((locked) => dispatch(doLockRoom({ locked })), [dispatch]);
|
|
196
|
+
const muteParticipants = React.useCallback((participantIds) => dispatch(doRequestAudioEnable({ clientIds: participantIds, enable: false })), [dispatch]);
|
|
197
|
+
const turnOffParticipantCameras = React.useCallback((participantIds) => dispatch(doRequestVideoEnable({ clientIds: participantIds, enable: false })), [dispatch]);
|
|
198
|
+
const spotlightParticipant = React.useCallback((participantId) => dispatch(doSpotlightParticipant({ id: participantId })), [dispatch]);
|
|
199
|
+
const removeSpotlight = React.useCallback((participantId) => dispatch(doRemoveSpotlight({ id: participantId })), [dispatch]);
|
|
200
|
+
const kickParticipant = React.useCallback((participantId) => dispatch(doKickParticipant({ clientId: participantId })), [dispatch]);
|
|
201
|
+
const endMeeting = React.useCallback((stayBehind) => dispatch(doEndMeeting({ stayBehind })), [dispatch]);
|
|
208
202
|
const { events } = roomConnectionState, state = __rest(roomConnectionState, ["events"]);
|
|
209
203
|
return {
|
|
210
204
|
state,
|
|
@@ -213,12 +207,14 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
213
207
|
toggleLowDataMode,
|
|
214
208
|
toggleRaiseHand,
|
|
215
209
|
askToSpeak,
|
|
210
|
+
askToTurnOnCamera,
|
|
216
211
|
acceptWaitingParticipant,
|
|
217
212
|
knock,
|
|
218
213
|
joinRoom,
|
|
219
214
|
leaveRoom,
|
|
220
215
|
lockRoom,
|
|
221
216
|
muteParticipants,
|
|
217
|
+
turnOffParticipantCameras,
|
|
222
218
|
kickParticipant,
|
|
223
219
|
endMeeting,
|
|
224
220
|
rejectWaitingParticipant,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whereby.com/browser-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "Modules for integration Whereby video in web apps",
|
|
5
5
|
"author": "Whereby AS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@radix-ui/react-popover": "^1.0.7",
|
|
81
81
|
"@reduxjs/toolkit": "^2.2.3",
|
|
82
|
-
"@whereby.com/core": "0.
|
|
82
|
+
"@whereby.com/core": "0.27.1",
|
|
83
83
|
"clsx": "^2.1.1",
|
|
84
84
|
"heresy": "^1.0.4",
|
|
85
85
|
"react-redux": "^9.1.1",
|