Provide speakerHeight to ringrtc
This commit is contained in:
parent
618a7725fe
commit
55a5c51236
7 changed files with 29 additions and 11 deletions
|
@ -178,10 +178,11 @@ const ActiveCallManager: React.FC<ActiveCallManagerPropsType> = ({
|
|||
);
|
||||
|
||||
const setGroupCallVideoRequestForConversation = useCallback(
|
||||
(resolutions: Array<GroupCallVideoRequest>) => {
|
||||
(resolutions: Array<GroupCallVideoRequest>, speakerHeight: number) => {
|
||||
setGroupCallVideoRequest({
|
||||
conversationId: conversation.id,
|
||||
resolutions,
|
||||
speakerHeight,
|
||||
});
|
||||
},
|
||||
[setGroupCallVideoRequest, conversation.id]
|
||||
|
|
|
@ -56,7 +56,10 @@ export type PropsType = {
|
|||
joinedAt?: number;
|
||||
me: ConversationType;
|
||||
openSystemPreferencesAction: () => unknown;
|
||||
setGroupCallVideoRequest: (_: Array<GroupCallVideoRequest>) => void;
|
||||
setGroupCallVideoRequest: (
|
||||
_: Array<GroupCallVideoRequest>,
|
||||
speakerHeight: number
|
||||
) => void;
|
||||
setLocalAudio: (_: SetLocalAudioType) => void;
|
||||
setLocalVideo: (_: SetLocalVideoType) => void;
|
||||
setLocalPreview: (_: SetLocalPreviewType) => void;
|
||||
|
|
|
@ -54,7 +54,10 @@ export type PropsType = {
|
|||
hangUpActiveCall: (reason: string) => void;
|
||||
hasLocalVideo: boolean;
|
||||
i18n: LocalizerType;
|
||||
setGroupCallVideoRequest: (_: Array<GroupCallVideoRequest>) => void;
|
||||
setGroupCallVideoRequest: (
|
||||
_: Array<GroupCallVideoRequest>,
|
||||
speakerHeight: number
|
||||
) => void;
|
||||
setLocalPreview: (_: SetLocalPreviewType) => void;
|
||||
setRendererCanvas: (_: SetRendererCanvasType) => void;
|
||||
switchToPresentationView: () => void;
|
||||
|
|
|
@ -76,7 +76,10 @@ export type PropsType = {
|
|||
activeCall: ActiveCallType;
|
||||
getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource;
|
||||
i18n: LocalizerType;
|
||||
setGroupCallVideoRequest: (_: Array<GroupCallVideoRequest>) => void;
|
||||
setGroupCallVideoRequest: (
|
||||
_: Array<GroupCallVideoRequest>,
|
||||
speakerHeight: number
|
||||
) => void;
|
||||
setRendererCanvas: (_: SetRendererCanvasType) => void;
|
||||
};
|
||||
|
||||
|
@ -124,11 +127,13 @@ export const CallingPipRemoteVideo = ({
|
|||
};
|
||||
}
|
||||
return nonRenderedRemoteParticipant(participant);
|
||||
})
|
||||
}),
|
||||
PIP_VIDEO_HEIGHT_PX
|
||||
);
|
||||
} else {
|
||||
setGroupCallVideoRequest(
|
||||
activeCall.remoteParticipants.map(nonRenderedRemoteParticipant)
|
||||
activeCall.remoteParticipants.map(nonRenderedRemoteParticipant),
|
||||
0
|
||||
);
|
||||
}
|
||||
}, [
|
||||
|
|
|
@ -48,7 +48,10 @@ type PropsType = {
|
|||
i18n: LocalizerType;
|
||||
isInSpeakerView: boolean;
|
||||
remoteParticipants: ReadonlyArray<GroupCallRemoteParticipantType>;
|
||||
setGroupCallVideoRequest: (_: Array<GroupCallVideoRequest>) => void;
|
||||
setGroupCallVideoRequest: (
|
||||
_: Array<GroupCallVideoRequest>,
|
||||
speakerHeight: number
|
||||
) => void;
|
||||
remoteAudioLevels: Map<number, number>;
|
||||
};
|
||||
|
||||
|
@ -377,7 +380,7 @@ export const GroupCallRemoteParticipants: React.FC<PropsType> = ({
|
|||
break;
|
||||
}
|
||||
|
||||
setGroupCallVideoRequest(videoRequest);
|
||||
setGroupCallVideoRequest(videoRequest, gridParticipantHeight);
|
||||
}, [
|
||||
devicePixelRatio,
|
||||
gridParticipantHeight,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue