2020-12-10 06:00:54 +08:00
|
|
|
import React from 'react';
|
|
|
|
import ScreenshareButton from './component';
|
2024-06-13 20:45:28 +08:00
|
|
|
import { useIsScreenSharingEnabled } from '/imports/ui/services/features';
|
2024-08-15 21:01:34 +08:00
|
|
|
import { useIsScreenBroadcasting, useIsScreenGloballyBroadcasting } from '/imports/ui/components/screenshare/service';
|
2024-05-18 04:33:52 +08:00
|
|
|
import useSettings from '/imports/ui/services/settings/hooks/useSettings';
|
|
|
|
import { SETTINGS } from '/imports/ui/services/settings/enums';
|
2020-12-10 06:00:54 +08:00
|
|
|
|
2024-05-18 04:33:52 +08:00
|
|
|
const ScreenshareButtonContainer = (props) => {
|
|
|
|
const { viewScreenshare: screenshareDataSavingSetting } = useSettings(SETTINGS.DATA_SAVING);
|
2024-06-13 20:45:28 +08:00
|
|
|
const screenIsBroadcasting = useIsScreenBroadcasting();
|
2024-08-15 21:01:34 +08:00
|
|
|
const { screenIsShared: isScreenGloballyBroadcasting } = useIsScreenGloballyBroadcasting();
|
2024-06-13 20:45:28 +08:00
|
|
|
const enabled = useIsScreenSharingEnabled();
|
2024-05-18 04:33:52 +08:00
|
|
|
return (
|
2024-06-13 20:45:28 +08:00
|
|
|
<ScreenshareButton
|
|
|
|
screenshareDataSavingSetting={screenshareDataSavingSetting}
|
|
|
|
isScreenBroadcasting={screenIsBroadcasting}
|
2024-08-15 21:01:34 +08:00
|
|
|
isScreenGloballyBroadcasting={isScreenGloballyBroadcasting}
|
2024-06-13 20:45:28 +08:00
|
|
|
enabled={enabled}
|
|
|
|
{...props}
|
|
|
|
/>
|
2024-05-18 04:33:52 +08:00
|
|
|
);
|
|
|
|
};
|
2020-12-10 06:00:54 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* All props, including the ones that are inherited from actions-bar
|
2023-03-28 05:40:08 +08:00
|
|
|
* isScreenBroadcasting,
|
2020-12-10 06:00:54 +08:00
|
|
|
* amIPresenter,
|
|
|
|
* screenSharingCheck,
|
|
|
|
* isMeteorConnected,
|
|
|
|
* screenshareDataSavingSetting,
|
|
|
|
*/
|
2024-06-13 20:45:28 +08:00
|
|
|
export default ScreenshareButtonContainer;
|