@stream-io/video-react-sdk 1.40.2 → 1.41.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.
- package/CHANGELOG.md +17 -4
- package/dist/embedded.cjs.js +4 -4
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +5 -5
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -6
- package/dist/index.es.js.map +1 -1
- package/dist/src/hooks/useRequestPermission.d.ts +2 -2
- package/package.json +3 -3
- package/src/components/CallControls/ScreenShareButton.tsx +5 -2
- package/src/components/CallControls/ToggleAudioButton.tsx +6 -2
- package/src/components/CallControls/ToggleVideoButton.tsx +6 -2
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +16 -12
- package/src/hooks/useRequestPermission.ts +4 -2
package/dist/embedded.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { memo, useState, useEffect, Fragment as Fragment$1, createContext, useContext, useCallback, useMemo, useRef, isValidElement, forwardRef, useLayoutEffect, lazy, Suspense } from 'react';
|
|
3
3
|
import { useCall, useCallStateHooks, useI18n, Restricted, useToggleCallRecording, useConnectedUser, useEffectEvent, useIsAudioConnecting, useIsVideoConnecting, StreamCallProvider, StreamVideoProvider, useSpeakerLayoutSortPreset } from '@stream-io/video-react-bindings';
|
|
4
|
-
import { hasAudio, hasScreenShareAudio, hasVideo, hasScreenShare, OwnCapability, Browsers, VisibilityState, hasPausedTrack, createSoundDetector, SfuModels, isPinned, name, NoiseCancellationSettingsModeEnum, CallingState, paginatedLayoutSortPreset, CallTypes, defaultSortPreset, humanize, StreamVideoClient } from '@stream-io/video-client';
|
|
4
|
+
import { hasAudio, hasScreenShareAudio, hasVideo, hasScreenShare, OwnCapability, Browsers, VisibilityState, hasPausedTrack, RequestPermissionRequestPermissionsEnum, createSoundDetector, SfuModels, isPinned, name, NoiseCancellationSettingsModeEnum, CallingState, paginatedLayoutSortPreset, CallTypes, defaultSortPreset, humanize, StreamVideoClient } from '@stream-io/video-client';
|
|
5
5
|
import { useFloating, offset, shift, flip, size, autoUpdate, FloatingOverlay, FloatingPortal, arrow, FloatingArrow, useListItem, useListNavigation, useTypeahead, useClick, useDismiss, useRole, useInteractions, FloatingFocusManager, FloatingList } from '@floating-ui/react';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
|
|
@@ -995,7 +995,7 @@ const ScreenShareButton = (props) => {
|
|
|
995
995
|
const { caption, optimisticUpdates } = props;
|
|
996
996
|
const { useHasOngoingScreenShare, useScreenShareState, useCallSettings } = useCallStateHooks();
|
|
997
997
|
const isSomeoneScreenSharing = useHasOngoingScreenShare();
|
|
998
|
-
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(
|
|
998
|
+
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(RequestPermissionRequestPermissionsEnum.SCREENSHARE);
|
|
999
999
|
const callSettings = useCallSettings();
|
|
1000
1000
|
const isScreenSharingAllowed = callSettings?.screensharing.enabled;
|
|
1001
1001
|
const { screenShare, optionsAwareIsMute, isTogglePending } = useScreenShareState({
|
|
@@ -1208,7 +1208,7 @@ const SpeakerTest = (props) => {
|
|
|
1208
1208
|
const audioElementRef = useRef(null);
|
|
1209
1209
|
const [isPlaying, setIsPlaying] = useState(false);
|
|
1210
1210
|
const { t } = useI18n();
|
|
1211
|
-
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.
|
|
1211
|
+
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.41.0"}/assets/piano.mp3`, } = props;
|
|
1212
1212
|
// Update audio output device when selection changes
|
|
1213
1213
|
useEffect(() => {
|
|
1214
1214
|
const audio = audioElementRef.current;
|
|
@@ -1337,7 +1337,7 @@ const ToggleAudioPreviewButton = (props) => {
|
|
|
1337
1337
|
const ToggleAudioPublishingButton = (props) => {
|
|
1338
1338
|
const { t } = useI18n();
|
|
1339
1339
|
const { caption, Menu = jsx(DeviceSelectorAudioInput, { visualType: "list" }), menuPlacement = 'top', onMenuToggle, optimisticUpdates, ...restCompositeButtonProps } = props;
|
|
1340
|
-
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(
|
|
1340
|
+
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(RequestPermissionRequestPermissionsEnum.SEND_AUDIO);
|
|
1341
1341
|
const { useMicrophoneState, useLocalParticipant } = useCallStateHooks();
|
|
1342
1342
|
const { microphone, hasBrowserPermission, isPromptingPermission, isTogglePending, optionsAwareIsMute, } = useMicrophoneState({ optimisticUpdates });
|
|
1343
1343
|
const localParticipant = useLocalParticipant();
|
|
@@ -1389,7 +1389,7 @@ const ToggleVideoPreviewButton = (props) => {
|
|
|
1389
1389
|
const ToggleVideoPublishingButton = (props) => {
|
|
1390
1390
|
const { t } = useI18n();
|
|
1391
1391
|
const { caption, Menu = jsx(DeviceSelectorVideo, { visualType: "list" }), menuPlacement = 'top', onMenuToggle, optimisticUpdates, ...restCompositeButtonProps } = props;
|
|
1392
|
-
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(
|
|
1392
|
+
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(RequestPermissionRequestPermissionsEnum.SEND_VIDEO);
|
|
1393
1393
|
const { useCameraState, useCallSettings, useLocalParticipant } = useCallStateHooks();
|
|
1394
1394
|
const { camera, optionsAwareIsMute, hasBrowserPermission, isPromptingPermission, isTogglePending, } = useCameraState({ optimisticUpdates });
|
|
1395
1395
|
const localParticipant = useLocalParticipant();
|