@stream-io/video-react-sdk 1.40.1 → 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 +27 -0
- package/dist/background-filters-D2U5UBbH.es.js.map +1 -1
- package/dist/background-filters-folwWrgs.cjs.js.map +1 -1
- package/dist/embedded-BackgroundFilters-D2U5UBbH.es.js.map +1 -1
- package/dist/embedded-BackgroundFilters-folwWrgs.cjs.js.map +1 -1
- package/dist/embedded.cjs.js +27 -26
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +28 -27
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +26 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +27 -26
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/Avatar/Avatar.d.ts +2 -2
- package/dist/src/components/BackgroundFilters/BackgroundFilters.d.ts +1 -1
- package/dist/src/components/BackgroundFilters/BackgroundFiltersProvider.d.ts +1 -1
- package/dist/src/components/Button/TextButton.d.ts +1 -1
- package/dist/src/components/CallControls/AcceptCallButton.d.ts +1 -1
- package/dist/src/components/CallControls/CallControls.d.ts +1 -1
- package/dist/src/components/CallControls/CallStatsButton.d.ts +1 -1
- package/dist/src/components/CallControls/CancelCallButton.d.ts +2 -2
- package/dist/src/components/CallControls/ReactionsButton.d.ts +2 -2
- package/dist/src/components/CallControls/RecordCallButton.d.ts +2 -2
- package/dist/src/components/CallControls/ScreenShareButton.d.ts +1 -1
- package/dist/src/components/CallControls/ToggleAudioButton.d.ts +2 -2
- package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +1 -1
- package/dist/src/components/CallControls/ToggleVideoButton.d.ts +2 -2
- package/dist/src/components/CallParticipantsList/BlockedUserListing.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantListing.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantsList.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.d.ts +1 -1
- package/dist/src/components/CallPreview/CallPreview.d.ts +1 -1
- package/dist/src/components/CallRecordingList/CallRecordingList.d.ts +1 -1
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.d.ts +1 -1
- package/dist/src/components/CallRecordingList/CallRecordingListItem.d.ts +1 -1
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.d.ts +1 -1
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.d.ts +1 -1
- package/dist/src/components/CallStats/CallStats.d.ts +2 -2
- package/dist/src/components/CallStats/CallStatsLatencyChart.d.ts +1 -1
- package/dist/src/components/DeviceSettings/AudioVolumeIndicator.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceAudioPreviewItem.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceSelector.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.d.ts +2 -2
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceSettings.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceVideoPreviewItem.d.ts +1 -1
- package/dist/src/components/DeviceSettings/SpeakerTest.d.ts +1 -1
- package/dist/src/components/DropdownSelect/DropdownSelect.d.ts +2 -2
- package/dist/src/components/Icon/Icon.d.ts +1 -1
- package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +1 -1
- package/dist/src/components/Menu/GenericMenu.d.ts +2 -2
- package/dist/src/components/Menu/MenuToggle.d.ts +1 -1
- package/dist/src/components/NoiseCancellation/NoiseCancellationProvider.d.ts +1 -1
- package/dist/src/components/Notification/MicCaptureErrorNotification.d.ts +1 -1
- package/dist/src/components/Notification/Notification.d.ts +1 -1
- package/dist/src/components/Notification/PermissionNotification.d.ts +1 -1
- package/dist/src/components/Notification/RecordingInProgressNotification.d.ts +1 -1
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.d.ts +1 -1
- package/dist/src/components/Permissions/PermissionRequests.d.ts +1 -1
- package/dist/src/components/Reaction/Reaction.d.ts +1 -1
- package/dist/src/components/RingingCall/RingingCall.d.ts +1 -1
- package/dist/src/components/RingingCall/RingingCallControls.d.ts +1 -1
- package/dist/src/components/Search/SearchInput.d.ts +1 -1
- package/dist/src/components/Search/SearchResults.d.ts +1 -1
- package/dist/src/components/StreamTheme/StreamTheme.d.ts +1 -1
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/Tooltip/WithTooltip.d.ts +1 -1
- package/dist/src/components/VideoPreview/VideoPreview.d.ts +1 -1
- package/dist/src/core/components/Audio/Audio.d.ts +1 -1
- package/dist/src/core/components/Audio/ParticipantsAudio.d.ts +1 -1
- package/dist/src/core/components/CallLayout/LivestreamLayout.d.ts +2 -2
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/Grid.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/Host.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/Pip.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/index.d.ts +3 -3
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +1 -1
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.d.ts +5 -5
- package/dist/src/core/components/ParticipantView/ParticipantActionsContextMenu.d.ts +1 -1
- package/dist/src/core/components/StreamVideo/StreamVideo.d.ts +1 -1
- package/dist/src/core/components/Video/Video.d.ts +1 -1
- package/dist/src/embedded/EmbeddedClientProvider.d.ts +1 -1
- package/dist/src/embedded/call/CallControls.d.ts +1 -1
- package/dist/src/embedded/call/CallHeader.d.ts +1 -1
- package/dist/src/embedded/call/CallLayout.d.ts +1 -1
- package/dist/src/embedded/call/CallStateRouter.d.ts +1 -1
- package/dist/src/embedded/call/EmbeddedCall.d.ts +1 -1
- package/dist/src/embedded/context/ConfigurationContext.d.ts +1 -1
- package/dist/src/embedded/livestream/EmbeddedLivestream.d.ts +1 -1
- package/dist/src/embedded/livestream/LivestreamUI.d.ts +1 -1
- package/dist/src/embedded/livestream/host/HostLayout.d.ts +1 -1
- package/dist/src/embedded/livestream/host/HostStateRouter.d.ts +1 -1
- package/dist/src/embedded/livestream/viewer/ViewerLayout.d.ts +1 -1
- package/dist/src/embedded/livestream/viewer/ViewerLobby.d.ts +1 -1
- package/dist/src/embedded/livestream/viewer/ViewerStateRouter.d.ts +1 -1
- package/dist/src/embedded/shared/BlurToggleButton/BlurToggleButton.d.ts +2 -2
- package/dist/src/embedded/shared/CallFeedback/CallEndedScreen.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/CallFeedback.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/RatingScreen.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/StarRating.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/ThankYouScreen.d.ts +1 -1
- package/dist/src/embedded/shared/ConnectionNotification/ConnectionNotification.d.ts +1 -1
- package/dist/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.d.ts +1 -1
- package/dist/src/embedded/shared/JoinError/JoinError.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/DeviceControls.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/DisabledDeviceButton.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/Lobby.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/ToggleCameraButton.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/ToggleMicButton.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/VideoPreviewFallbacks.d.ts +2 -2
- package/dist/src/embedded/shared/ViewersCount/ViewersCount.d.ts +1 -1
- package/dist/src/hooks/useRequestPermission.d.ts +2 -2
- package/dist/src/wrappers/LivestreamPlayer/LivestreamPlayer.d.ts +1 -1
- package/package.json +13 -13
- package/src/components/BackgroundFilters/BackgroundFilters.tsx +2 -4
- package/src/components/Button/CompositeButton.tsx +2 -2
- package/src/components/Button/IconButton.tsx +1 -1
- package/src/components/CallControls/CallStatsButton.tsx +1 -1
- package/src/components/CallControls/CancelCallButton.tsx +1 -1
- package/src/components/CallControls/ReactionsButton.tsx +1 -1
- package/src/components/CallControls/RecordCallButton.tsx +1 -1
- 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/components/CallParticipantsList/CallParticipantListingItem.tsx +2 -2
- package/src/components/CallParticipantsList/CallParticipantsList.tsx +1 -1
- package/src/components/DeviceSettings/DeviceSettings.tsx +1 -1
- package/src/components/Permissions/PermissionRequests.tsx +1 -1
- package/src/core/components/Audio/Audio.tsx +1 -1
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +1 -1
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +16 -12
- package/src/core/components/ParticipantView/ParticipantView.tsx +124 -120
- package/src/core/components/Video/BaseVideo.tsx +1 -1
- package/src/core/components/Video/DefaultPictureInPicturePlaceholder.tsx +1 -1
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +1 -1
- package/src/embedded/shared/Lobby/ToggleCameraButton.tsx +1 -1
- package/src/embedded/shared/Lobby/ToggleMicButton.tsx +1 -1
- package/src/embedded/types.ts +1 -3
- package/src/hooks/useRequestPermission.ts +4 -2
|
@@ -72,131 +72,135 @@ export type ParticipantViewProps = {
|
|
|
72
72
|
} & Pick<VideoProps, 'VideoPlaceholder' | 'PictureInPicturePlaceholder'>;
|
|
73
73
|
|
|
74
74
|
export const ParticipantView = memo(
|
|
75
|
-
forwardRef<HTMLDivElement, ParticipantViewProps>(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
trackType = 'videoTrack',
|
|
79
|
-
mirror,
|
|
80
|
-
muteAudio,
|
|
81
|
-
refs: { setVideoElement, setVideoPlaceholderElement } = {},
|
|
82
|
-
className,
|
|
83
|
-
VideoPlaceholder,
|
|
84
|
-
PictureInPicturePlaceholder,
|
|
85
|
-
ParticipantViewUI = DefaultParticipantViewUI as ComponentType,
|
|
86
|
-
},
|
|
87
|
-
ref,
|
|
88
|
-
) {
|
|
89
|
-
const { isLocalParticipant, isSpeaking, isDominantSpeaker, sessionId } =
|
|
90
|
-
participant;
|
|
91
|
-
|
|
92
|
-
const hasAudioTrack = hasAudio(participant);
|
|
93
|
-
const hasVideoTrack = hasVideo(participant);
|
|
94
|
-
const hasScreenShareAudioTrack = hasScreenShareAudio(participant);
|
|
95
|
-
|
|
96
|
-
const [trackedElement, setTrackedElement] = useState<HTMLDivElement | null>(
|
|
97
|
-
null,
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const [contextVideoElement, setContextVideoElement] =
|
|
101
|
-
useState<HTMLVideoElement | null>(null);
|
|
102
|
-
|
|
103
|
-
const [contextVideoPlaceholderElement, setContextVideoPlaceholderElement] =
|
|
104
|
-
useState<HTMLDivElement | null>(null);
|
|
105
|
-
|
|
106
|
-
useTrackElementVisibility({
|
|
107
|
-
sessionId,
|
|
108
|
-
trackedElement,
|
|
109
|
-
trackType,
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
const { useIncomingVideoSettings } = useCallStateHooks();
|
|
113
|
-
const { isParticipantVideoEnabled } = useIncomingVideoSettings();
|
|
114
|
-
|
|
115
|
-
const participantViewContextValue = useMemo(
|
|
116
|
-
() => ({
|
|
75
|
+
forwardRef<HTMLDivElement, ParticipantViewProps>(
|
|
76
|
+
function ParticipantViewRender(
|
|
77
|
+
{
|
|
117
78
|
participant,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
79
|
+
trackType = 'videoTrack',
|
|
80
|
+
mirror,
|
|
81
|
+
muteAudio,
|
|
82
|
+
refs: { setVideoElement, setVideoPlaceholderElement } = {},
|
|
83
|
+
className,
|
|
84
|
+
VideoPlaceholder,
|
|
85
|
+
PictureInPicturePlaceholder,
|
|
86
|
+
ParticipantViewUI = DefaultParticipantViewUI as ComponentType,
|
|
87
|
+
},
|
|
88
|
+
ref,
|
|
89
|
+
) {
|
|
90
|
+
const { isLocalParticipant, isSpeaking, isDominantSpeaker, sessionId } =
|
|
91
|
+
participant;
|
|
92
|
+
|
|
93
|
+
const hasAudioTrack = hasAudio(participant);
|
|
94
|
+
const hasVideoTrack = hasVideo(participant);
|
|
95
|
+
const hasScreenShareAudioTrack = hasScreenShareAudio(participant);
|
|
96
|
+
|
|
97
|
+
const [trackedElement, setTrackedElement] =
|
|
98
|
+
useState<HTMLDivElement | null>(null);
|
|
99
|
+
|
|
100
|
+
const [contextVideoElement, setContextVideoElement] =
|
|
101
|
+
useState<HTMLVideoElement | null>(null);
|
|
102
|
+
|
|
103
|
+
const [
|
|
125
104
|
contextVideoPlaceholderElement,
|
|
126
|
-
|
|
105
|
+
setContextVideoPlaceholderElement,
|
|
106
|
+
] = useState<HTMLDivElement | null>(null);
|
|
107
|
+
|
|
108
|
+
useTrackElementVisibility({
|
|
109
|
+
sessionId,
|
|
127
110
|
trackedElement,
|
|
128
111
|
trackType,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
participant={participant}
|
|
181
|
-
trackType={trackType}
|
|
182
|
-
refs={videoRefs}
|
|
183
|
-
enabled={
|
|
184
|
-
isLocalParticipant ||
|
|
185
|
-
trackType !== 'videoTrack' ||
|
|
186
|
-
isParticipantVideoEnabled(participant.sessionId)
|
|
187
|
-
}
|
|
188
|
-
mirror={mirror}
|
|
189
|
-
autoPlay
|
|
190
|
-
/>
|
|
191
|
-
{isComponentType(ParticipantViewUI) ? (
|
|
192
|
-
<ParticipantViewUI />
|
|
193
|
-
) : (
|
|
194
|
-
ParticipantViewUI
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const { useIncomingVideoSettings } = useCallStateHooks();
|
|
115
|
+
const { isParticipantVideoEnabled } = useIncomingVideoSettings();
|
|
116
|
+
|
|
117
|
+
const participantViewContextValue = useMemo(
|
|
118
|
+
() => ({
|
|
119
|
+
participant,
|
|
120
|
+
participantViewElement: trackedElement,
|
|
121
|
+
videoElement: contextVideoElement,
|
|
122
|
+
videoPlaceholderElement: contextVideoPlaceholderElement,
|
|
123
|
+
trackType,
|
|
124
|
+
}),
|
|
125
|
+
[
|
|
126
|
+
contextVideoElement,
|
|
127
|
+
contextVideoPlaceholderElement,
|
|
128
|
+
participant,
|
|
129
|
+
trackedElement,
|
|
130
|
+
trackType,
|
|
131
|
+
],
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const videoRefs: VideoProps['refs'] = useMemo(
|
|
135
|
+
() => ({
|
|
136
|
+
setVideoElement: (element) => {
|
|
137
|
+
setVideoElement?.(element);
|
|
138
|
+
setContextVideoElement(element);
|
|
139
|
+
},
|
|
140
|
+
setVideoPlaceholderElement: (element) => {
|
|
141
|
+
setVideoPlaceholderElement?.(element);
|
|
142
|
+
setContextVideoPlaceholderElement(element);
|
|
143
|
+
},
|
|
144
|
+
}),
|
|
145
|
+
[setVideoElement, setVideoPlaceholderElement],
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<div
|
|
150
|
+
data-testid="participant-view"
|
|
151
|
+
ref={(element) => {
|
|
152
|
+
applyElementToRef(ref, element);
|
|
153
|
+
setTrackedElement(element);
|
|
154
|
+
}}
|
|
155
|
+
className={clsx(
|
|
156
|
+
'str-video__participant-view',
|
|
157
|
+
isDominantSpeaker &&
|
|
158
|
+
'str-video__participant-view--dominant-speaker',
|
|
159
|
+
isSpeaking && 'str-video__participant-view--speaking',
|
|
160
|
+
!hasVideoTrack && 'str-video__participant-view--no-video',
|
|
161
|
+
!hasAudioTrack && 'str-video__participant-view--no-audio',
|
|
162
|
+
className,
|
|
195
163
|
)}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
164
|
+
>
|
|
165
|
+
<ParticipantViewContext.Provider value={participantViewContextValue}>
|
|
166
|
+
{/* mute the local participant, as we don't want to hear ourselves */}
|
|
167
|
+
{!isLocalParticipant && !muteAudio && (
|
|
168
|
+
<>
|
|
169
|
+
{hasAudioTrack && (
|
|
170
|
+
<Audio participant={participant} trackType="audioTrack" />
|
|
171
|
+
)}
|
|
172
|
+
{hasScreenShareAudioTrack && (
|
|
173
|
+
<Audio
|
|
174
|
+
participant={participant}
|
|
175
|
+
trackType="screenShareAudioTrack"
|
|
176
|
+
/>
|
|
177
|
+
)}
|
|
178
|
+
</>
|
|
179
|
+
)}
|
|
180
|
+
<Video
|
|
181
|
+
VideoPlaceholder={VideoPlaceholder}
|
|
182
|
+
PictureInPicturePlaceholder={PictureInPicturePlaceholder}
|
|
183
|
+
participant={participant}
|
|
184
|
+
trackType={trackType}
|
|
185
|
+
refs={videoRefs}
|
|
186
|
+
enabled={
|
|
187
|
+
isLocalParticipant ||
|
|
188
|
+
trackType !== 'videoTrack' ||
|
|
189
|
+
isParticipantVideoEnabled(participant.sessionId)
|
|
190
|
+
}
|
|
191
|
+
mirror={mirror}
|
|
192
|
+
autoPlay
|
|
193
|
+
/>
|
|
194
|
+
{isComponentType(ParticipantViewUI) ? (
|
|
195
|
+
<ParticipantViewUI />
|
|
196
|
+
) : (
|
|
197
|
+
ParticipantViewUI
|
|
198
|
+
)}
|
|
199
|
+
</ParticipantViewContext.Provider>
|
|
200
|
+
</div>
|
|
201
|
+
);
|
|
202
|
+
},
|
|
203
|
+
),
|
|
200
204
|
);
|
|
201
205
|
|
|
202
206
|
ParticipantView.displayName = 'ParticipantView';
|
|
@@ -12,7 +12,7 @@ export type BaseVideoProps = ComponentPropsWithRef<'video'> & {
|
|
|
12
12
|
* (`srcObject`) to reactively handle stream changes
|
|
13
13
|
*/
|
|
14
14
|
export const BaseVideo = forwardRef<HTMLVideoElement, BaseVideoProps>(
|
|
15
|
-
function
|
|
15
|
+
function BaseVideoRender({ stream, ...rest }, ref) {
|
|
16
16
|
const [videoElement, setVideoElement] = useState<HTMLVideoElement | null>(
|
|
17
17
|
null,
|
|
18
18
|
);
|
|
@@ -10,7 +10,7 @@ export type PictureInPicturePlaceholderProps = BaseVideoPlaceholderProps;
|
|
|
10
10
|
export const DefaultPictureInPicturePlaceholder = forwardRef<
|
|
11
11
|
HTMLDivElement,
|
|
12
12
|
PictureInPicturePlaceholderProps
|
|
13
|
-
>(function
|
|
13
|
+
>(function DefaultPictureInPicturePlaceholderRender(props, ref) {
|
|
14
14
|
const { t } = useI18n();
|
|
15
15
|
return (
|
|
16
16
|
<BaseVideoPlaceholder ref={ref} {...props}>
|
|
@@ -10,7 +10,7 @@ export type VideoPlaceholderProps = BaseVideoPlaceholderProps;
|
|
|
10
10
|
export const DefaultVideoPlaceholder = forwardRef<
|
|
11
11
|
HTMLDivElement,
|
|
12
12
|
VideoPlaceholderProps
|
|
13
|
-
>(function
|
|
13
|
+
>(function DefaultVideoPlaceholderRender(props, ref) {
|
|
14
14
|
const { t } = useI18n();
|
|
15
15
|
return (
|
|
16
16
|
<BaseVideoPlaceholder ref={ref} {...props}>
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { CameraMenuWithBlur } from '../BlurToggleButton/BlurToggleButton';
|
|
11
11
|
|
|
12
12
|
const ToggleMenuButton = forwardRef<HTMLButtonElement, ToggleMenuButtonProps>(
|
|
13
|
-
function
|
|
13
|
+
function ToggleMenuButtonRender(props, ref) {
|
|
14
14
|
const { useCameraState } = useCallStateHooks();
|
|
15
15
|
const { selectedDevice: selectedCamera, devices: cameras } =
|
|
16
16
|
useCameraState();
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from '../../../components';
|
|
12
12
|
|
|
13
13
|
const ToggleMenuButton = forwardRef<HTMLButtonElement, ToggleMenuButtonProps>(
|
|
14
|
-
function
|
|
14
|
+
function ToggleMenuButtonRender(props, ref) {
|
|
15
15
|
const { useMicrophoneState } = useCallStateHooks();
|
|
16
16
|
const { selectedDevice: selectedMic, devices: microphones } =
|
|
17
17
|
useMicrophoneState();
|
package/src/embedded/types.ts
CHANGED
|
@@ -48,9 +48,7 @@ export interface EmbeddedAnonymousUser {
|
|
|
48
48
|
* Discriminated union for embedded user configuration.
|
|
49
49
|
*/
|
|
50
50
|
export type EmbeddedUser =
|
|
51
|
-
|
|
|
52
|
-
| EmbeddedGuestUser
|
|
53
|
-
| EmbeddedAnonymousUser;
|
|
51
|
+
EmbeddedAuthenticatedUser | EmbeddedGuestUser | EmbeddedAnonymousUser;
|
|
54
52
|
|
|
55
53
|
/**
|
|
56
54
|
* Base props shared by EmbeddedCall and EmbeddedLivestream.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { RequestPermissionRequestPermissionsEnum } from '@stream-io/video-client';
|
|
3
3
|
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
4
4
|
|
|
5
|
-
export const useRequestPermission = (
|
|
5
|
+
export const useRequestPermission = (
|
|
6
|
+
permission: RequestPermissionRequestPermissionsEnum,
|
|
7
|
+
) => {
|
|
6
8
|
const call = useCall();
|
|
7
9
|
const { useHasPermissions } = useCallStateHooks();
|
|
8
10
|
const hasPermission = useHasPermissions(permission);
|