Merge pull request #20477 from gustavotrott/component-flag-sharingCamera
refactor (graphql-server): Introduces `meeting_componentFlags.hasCameraAsContent`
This commit is contained in:
commit
9639f70444
@ -2133,7 +2133,14 @@ select "meeting"."meetingId",
|
||||
select 1
|
||||
from "v_screenshare"
|
||||
where "v_screenshare"."meetingId" = "meeting"."meetingId"
|
||||
and "contentType" = 'screenshare'
|
||||
) as "hasScreenshare",
|
||||
exists (
|
||||
select 1
|
||||
from "v_screenshare"
|
||||
where "v_screenshare"."meetingId" = "meeting"."meetingId"
|
||||
and "contentType" = 'camera'
|
||||
) as "hasCameraAsContent",
|
||||
exists (
|
||||
select 1
|
||||
from "v_externalVideo"
|
||||
|
@ -15,6 +15,7 @@ select_permissions:
|
||||
- hasExternalVideo
|
||||
- hasPoll
|
||||
- hasScreenshare
|
||||
- hasCameraAsContent
|
||||
- hasTimer
|
||||
- showRemainingTime
|
||||
filter:
|
||||
|
@ -104,6 +104,7 @@ export interface ComponentsFlags {
|
||||
hasScreenshare: boolean;
|
||||
hasTimer: boolean;
|
||||
showRemainingTime: boolean;
|
||||
hasCameraAsContent: boolean;
|
||||
}
|
||||
|
||||
export interface Metadata {
|
||||
|
@ -23,7 +23,6 @@ import { EXTERNAL_VIDEO_STOP } from '../external-video-player/mutations';
|
||||
import { PINNED_PAD_SUBSCRIPTION } from '../notes/queries';
|
||||
import useDeduplicatedSubscription from '../../core/hooks/useDeduplicatedSubscription';
|
||||
import connectionStatus from '../../core/graphql/singletons/connectionStatus';
|
||||
import { getSceenShareType } from './queries';
|
||||
|
||||
const isReactionsButtonEnabled = () => {
|
||||
const USER_REACTIONS_ENABLED = window.meetingClientSettings.public.userReaction.enabled;
|
||||
@ -39,10 +38,6 @@ const ActionsBarContainer = (props) => {
|
||||
const RAISE_HAND_BUTTON_CENTERED = window.meetingClientSettings
|
||||
.public.app.raiseHandActionButton.centered;
|
||||
|
||||
const {
|
||||
data: sceenShareType,
|
||||
} = useDeduplicatedSubscription(getSceenShareType);
|
||||
|
||||
const actionsBarStyle = layoutSelectOutput((i) => i.actionBar);
|
||||
const layoutContextDispatch = layoutDispatch();
|
||||
|
||||
@ -108,8 +103,7 @@ const ActionsBarContainer = (props) => {
|
||||
setPresentationIsOpen: MediaService.setPresentationIsOpen,
|
||||
hasScreenshare: currentMeeting?.componentsFlags?.hasScreenshare ?? false,
|
||||
isMeteorConnected: connected,
|
||||
hasCameraAsContent: currentMeeting?.componentsFlags?.hasScreenshare
|
||||
&& sceenShareType?.screenshare[0]?.contentType,
|
||||
hasCameraAsContent: currentMeeting?.componentsFlags?.hasCameraAsContent,
|
||||
intl,
|
||||
allowExternalVideo,
|
||||
isPollingEnabled,
|
||||
|
@ -1,21 +0,0 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
interface ScreenShare {
|
||||
contentType: string;
|
||||
}
|
||||
|
||||
export interface GetScreenShareTypeResponse {
|
||||
screenshare: ScreenShare[];
|
||||
}
|
||||
|
||||
export const getSceenShareType = gql`
|
||||
subscription getSceenShareType {
|
||||
screenshare {
|
||||
contentType
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default {
|
||||
getSceenShareType,
|
||||
};
|
@ -255,7 +255,8 @@ const AppContainer = (props) => {
|
||||
};
|
||||
|
||||
const shouldShowScreenshare = (viewScreenshare || isPresenter)
|
||||
&& currentMeeting?.componentsFlags?.hasScreenshare;
|
||||
&& (currentMeeting?.componentsFlags?.hasScreenshare
|
||||
|| currentMeeting?.componentsFlags?.hasCameraAsContent);
|
||||
const shouldShowPresentation = (!shouldShowScreenshare && !isSharedNotesPinned
|
||||
&& !shouldShowExternalVideo && !shouldShowGenericMainContent
|
||||
&& (presentationIsOpen || presentationRestoreOnUpdate)) && isPresentationEnabled;
|
||||
|
@ -121,6 +121,7 @@ const MEETING_SUBSCRIPTION = gql`
|
||||
hasScreenshare
|
||||
hasTimer
|
||||
showRemainingTime
|
||||
hasCameraAsContent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user