@stream-io/video-react-sdk 0.4.8 → 0.4.10
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 -0
- package/dist/index.cjs.js +1 -32
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -32
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/hooks/index.d.ts +0 -1
- package/package.json +3 -3
- package/src/core/hooks/index.ts +0 -1
- package/dist/src/core/hooks/useDevices.d.ts +0 -1
- package/src/core/hooks/useDevices.ts +0 -33
package/dist/index.es.js
CHANGED
|
@@ -165,36 +165,6 @@ const Video$1 = ({ trackType, participant, className, VideoPlaceholder = Default
|
|
|
165
165
|
} })), (hasNoVideoOrInvisible || isVideoPaused) && (jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
const useHasBrowserPermissions = (permissionName) => {
|
|
169
|
-
const [canSubscribe, enableSubscription] = useState(false);
|
|
170
|
-
useEffect(() => {
|
|
171
|
-
let permissionState;
|
|
172
|
-
const handlePermissionChange = (e) => {
|
|
173
|
-
const { state } = e.target;
|
|
174
|
-
enableSubscription(state === 'granted');
|
|
175
|
-
};
|
|
176
|
-
const checkPermissions = async () => {
|
|
177
|
-
try {
|
|
178
|
-
permissionState = await navigator.permissions.query({
|
|
179
|
-
name: permissionName,
|
|
180
|
-
});
|
|
181
|
-
permissionState.addEventListener('change', handlePermissionChange);
|
|
182
|
-
enableSubscription(permissionState.state === 'granted');
|
|
183
|
-
}
|
|
184
|
-
catch (e) {
|
|
185
|
-
// permission does not exist - cannot be queried
|
|
186
|
-
// an example would be Firefox - camera, neither microphone perms can be queried
|
|
187
|
-
enableSubscription(true);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
checkPermissions();
|
|
191
|
-
return () => {
|
|
192
|
-
permissionState?.removeEventListener('change', handlePermissionChange);
|
|
193
|
-
};
|
|
194
|
-
}, [permissionName]);
|
|
195
|
-
return canSubscribe;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
168
|
const useTrackElementVisibility = ({ trackedElement, dynascaleManager: propsDynascaleManager, sessionId, trackType, }) => {
|
|
199
169
|
const call = useCall();
|
|
200
170
|
const manager = propsDynascaleManager ?? call?.dynascaleManager;
|
|
@@ -1995,7 +1965,7 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
|
1995
1965
|
};
|
|
1996
1966
|
const hasScreenShare = (p) => !!p?.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE);
|
|
1997
1967
|
|
|
1998
|
-
const [major, minor, patch] = ("0.4.
|
|
1968
|
+
const [major, minor, patch] = ("0.4.10" ).split('.');
|
|
1999
1969
|
setSdkInfo({
|
|
2000
1970
|
type: SfuModels.SdkType.REACT,
|
|
2001
1971
|
major,
|
|
@@ -2003,5 +1973,5 @@ setSdkInfo({
|
|
|
2003
1973
|
patch,
|
|
2004
1974
|
});
|
|
2005
1975
|
|
|
2006
|
-
export { AcceptCallButton, Audio, Avatar, AvatarFallback, BaseVideo, CallControls, CallParticipantListing, CallParticipantListingItem, CallParticipantsList, CallPreview, CallRecordingList, CallRecordingListHeader, CallRecordingListItem, CallStats, CallStatsButton, CallStatsLatencyChart, CancelCallButton, CompositeButton, CopyToClipboardButton, CopyToClipboardButtonWithPopup, DefaultParticipantViewUI, DefaultReactionsMenu, DefaultScreenShareOverlay, DefaultVideoPlaceholder, DeviceSelector, DeviceSelectorAudioInput, DeviceSelectorAudioOutput, DeviceSelectorVideo, DeviceSettings, EmptyCallRecordingListing, GenericMenu, GenericMenuButtonItem, Icon, IconButton, LivestreamLayout, LoadingCallRecordingListing, LoadingIndicator, MenuToggle, Notification, PaginatedGridLayout, ParticipantActionsContextMenu, ParticipantDetails, ParticipantView, ParticipantViewContext, ParticipantsAudio, PermissionNotification, PermissionRequestList, PermissionRequests, ReactionsButton, RecordCallButton, RingingCall, RingingCallControls, ScreenShareButton, SearchInput, SearchResults, SpeakerLayout, SpeakingWhileMutedNotification, StatCard, StreamCall, StreamTheme, StreamVideo, TextButton, ToggleAudioOutputButton, ToggleAudioPreviewButton, ToggleAudioPublishingButton, ToggleVideoPreviewButton, ToggleVideoPublishingButton, Tooltip, Video$1 as Video, VideoPreview, WithTooltip, defaultReactions, translations,
|
|
1976
|
+
export { AcceptCallButton, Audio, Avatar, AvatarFallback, BaseVideo, CallControls, CallParticipantListing, CallParticipantListingItem, CallParticipantsList, CallPreview, CallRecordingList, CallRecordingListHeader, CallRecordingListItem, CallStats, CallStatsButton, CallStatsLatencyChart, CancelCallButton, CompositeButton, CopyToClipboardButton, CopyToClipboardButtonWithPopup, DefaultParticipantViewUI, DefaultReactionsMenu, DefaultScreenShareOverlay, DefaultVideoPlaceholder, DeviceSelector, DeviceSelectorAudioInput, DeviceSelectorAudioOutput, DeviceSelectorVideo, DeviceSettings, EmptyCallRecordingListing, GenericMenu, GenericMenuButtonItem, Icon, IconButton, LivestreamLayout, LoadingCallRecordingListing, LoadingIndicator, MenuToggle, Notification, PaginatedGridLayout, ParticipantActionsContextMenu, ParticipantDetails, ParticipantView, ParticipantViewContext, ParticipantsAudio, PermissionNotification, PermissionRequestList, PermissionRequests, ReactionsButton, RecordCallButton, RingingCall, RingingCallControls, ScreenShareButton, SearchInput, SearchResults, SpeakerLayout, SpeakingWhileMutedNotification, StatCard, StreamCall, StreamTheme, StreamVideo, TextButton, ToggleAudioOutputButton, ToggleAudioPreviewButton, ToggleAudioPublishingButton, ToggleVideoPreviewButton, ToggleVideoPublishingButton, Tooltip, Video$1 as Video, VideoPreview, WithTooltip, defaultReactions, translations, useHorizontalScrollPosition, useParticipantViewContext, usePersistedDevicePreferences, useRequestPermission, useTrackElementVisibility, useVerticalScrollPosition };
|
|
2007
1977
|
//# sourceMappingURL=index.es.js.map
|