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';
|
|
|
|
import { useIsScreenBroadcasting } 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();
|
|
|
|
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}
|
|
|
|
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;
|