Set receiver video constraint in load-test script, as-if tile view. (#8567)
This commit is contained in:
parent
bfc4b2ac6f
commit
4beca0d5dd
|
@ -29,6 +29,8 @@ let numParticipants = 1;
|
|||
let localTracks = [];
|
||||
const remoteTracks = {};
|
||||
|
||||
let maxFrameHeight = 0;
|
||||
|
||||
window.APP = {
|
||||
conference: {
|
||||
getStats() {
|
||||
|
@ -66,11 +68,32 @@ window.APP = {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Simple emulation of jitsi-meet's screen layout behavior
|
||||
*/
|
||||
function updateMaxFrameHeight() {
|
||||
let newMaxFrameHeight;
|
||||
|
||||
if (numParticipants <= 2) {
|
||||
newMaxFrameHeight = 720;
|
||||
} else if (numParticipants <= 4) {
|
||||
newMaxFrameHeight = 360;
|
||||
} else {
|
||||
newMaxFrameHeight = 180;
|
||||
}
|
||||
|
||||
if (room && maxFrameHeight !== newMaxFrameHeight) {
|
||||
maxFrameHeight = newMaxFrameHeight;
|
||||
room.setReceiverVideoConstraint(maxFrameHeight);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function setNumberOfParticipants() {
|
||||
$('#participants').text(numParticipants);
|
||||
updateMaxFrameHeight();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -165,6 +188,7 @@ function onConnectionSuccess() {
|
|||
});
|
||||
room.on(JitsiMeetJS.events.conference.USER_LEFT, onUserLeft);
|
||||
room.join();
|
||||
updateMaxFrameHeight();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue