Respect changing PPI during screen share
This commit is contained in:
parent
e98b281644
commit
5eee11e89c
1 changed files with 8 additions and 5 deletions
|
@ -17,6 +17,7 @@ import type {
|
|||
import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { usePageVisibility } from '../hooks/usePageVisibility';
|
||||
import { useDevicePixelRatio } from '../hooks/useDevicePixelRatio';
|
||||
import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { SECOND } from '../util/durations';
|
||||
|
@ -94,6 +95,8 @@ export const GroupCallRemoteParticipants: React.FC<PropsType> = ({
|
|||
height: 0,
|
||||
});
|
||||
|
||||
const devicePixelRatio = useDevicePixelRatio();
|
||||
|
||||
const getFrameBuffer = useGetCallingFrameBuffer();
|
||||
|
||||
const { invisibleDemuxIds, onParticipantVisibilityChanged } =
|
||||
|
@ -298,9 +301,8 @@ export const GroupCallRemoteParticipants: React.FC<PropsType> = ({
|
|||
...gridParticipants.map(participant => {
|
||||
let scalar: number;
|
||||
if (participant.sharingScreen) {
|
||||
// We want best-resolution video if someone is sharing their screen. This
|
||||
// code is extra-defensive against strange devicePixelRatios.
|
||||
scalar = Math.max(window.devicePixelRatio || 1, 1);
|
||||
// We want best-resolution video if someone is sharing their screen.
|
||||
scalar = Math.max(devicePixelRatio, 1);
|
||||
} else if (participant.hasRemoteVideo) {
|
||||
scalar = VIDEO_REQUEST_SCALAR;
|
||||
} else {
|
||||
|
@ -357,13 +359,14 @@ export const GroupCallRemoteParticipants: React.FC<PropsType> = ({
|
|||
|
||||
setGroupCallVideoRequest(videoRequest);
|
||||
}, [
|
||||
devicePixelRatio,
|
||||
gridParticipantHeight,
|
||||
videoRequestMode,
|
||||
gridParticipants,
|
||||
invisibleDemuxIds,
|
||||
overflowedParticipants,
|
||||
remoteParticipants,
|
||||
setGroupCallVideoRequest,
|
||||
gridParticipants,
|
||||
videoRequestMode,
|
||||
]);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Reference in a new issue