mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Currently if a button in the main toolbar is not visible, the button is not replaced by another button from the overflow menu.
26 lines
616 B
TypeScript
26 lines
616 B
TypeScript
import { useSelector } from 'react-redux';
|
|
|
|
import { isMobileBrowser } from '../base/environment/utils';
|
|
import { isVpaasMeeting } from '../jaas/functions';
|
|
|
|
import EmbedMeetingButton from './components/EmbedMeetingButton';
|
|
|
|
const embed = {
|
|
key: 'embedmeeting',
|
|
Content: EmbedMeetingButton,
|
|
group: 4
|
|
};
|
|
|
|
/**
|
|
* A hook that returns the embed button if it is enabled and undefined otherwise.
|
|
*
|
|
* @returns {Object | undefined}
|
|
*/
|
|
export function useEmbedButton() {
|
|
const _isVpaasMeeting = useSelector(isVpaasMeeting);
|
|
|
|
if (!isMobileBrowser() && !_isVpaasMeeting) {
|
|
return embed;
|
|
}
|
|
}
|