@100mslive/roomkit-react 0.2.7-alpha.2 → 0.2.7-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-DQJBCEW4.js → HLSView-NDCESLVD.js} +2 -2
- package/dist/{chunk-GEXL6KL2.js → chunk-AGREPSFA.js} +111 -94
- package/dist/{chunk-GEXL6KL2.js.map → chunk-AGREPSFA.js.map} +3 -3
- package/dist/index.cjs.js +108 -93
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +30 -20
- package/dist/meta.esbuild.json +36 -26
- package/package.json +6 -6
- package/src/Prebuilt/components/AppData/useUISettings.js +1 -1
- package/src/Prebuilt/components/AudioVideoToggle.tsx +31 -27
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +4 -8
- package/src/Prebuilt/components/Notifications/Notifications.tsx +15 -2
- package/src/Prebuilt/components/ScreenShareToggle.jsx +5 -3
- /package/dist/{HLSView-DQJBCEW4.js.map → HLSView-NDCESLVD.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { Fragment } from 'react';
|
2
|
-
import { selectIsAllowedToPublish, useHMSStore, useScreenShare } from '@100mslive/react-sdk';
|
2
|
+
import { selectIsAllowedToPublish, useAwayNotifications, useHMSStore, useScreenShare } from '@100mslive/react-sdk';
|
3
3
|
import { ShareScreenIcon } from '@100mslive/react-icons';
|
4
4
|
import { ShareScreenOptions } from './pdfAnnotator/shareScreenOptions';
|
5
5
|
import { Box, Flex } from '../../Layout';
|
@@ -14,6 +14,7 @@ export const ScreenshareToggle = ({ css = {} }) => {
|
|
14
14
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
15
15
|
|
16
16
|
const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = useScreenShare();
|
17
|
+
const { requestPermission } = useAwayNotifications();
|
17
18
|
const isVideoScreenshare = amIScreenSharing && !!video;
|
18
19
|
if (!isAllowedToPublish.screen || !isScreenshareSupported()) {
|
19
20
|
return null;
|
@@ -28,8 +29,9 @@ export const ScreenshareToggle = ({ css = {} }) => {
|
|
28
29
|
active={!isVideoScreenshare}
|
29
30
|
css={css}
|
30
31
|
disabled={isAudioOnly}
|
31
|
-
onClick={() => {
|
32
|
-
toggleScreenShare();
|
32
|
+
onClick={async () => {
|
33
|
+
await toggleScreenShare();
|
34
|
+
await requestPermission();
|
33
35
|
}}
|
34
36
|
>
|
35
37
|
<Tooltip title={`${!isVideoScreenshare ? 'Start' : 'Stop'} screen sharing`}>
|
File without changes
|