Compare commits
1 Commits
ea1cf80e67
...
nova
| Author | SHA1 | Date | |
|---|---|---|---|
| 364a057712 |
@@ -2047,6 +2047,42 @@
|
|||||||
return getPoliticTalkRenderedParticipantTiles(videospace, 44, 44).length;
|
return getPoliticTalkRenderedParticipantTiles(videospace, 44, 44).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPoliticTalkRemoteParticipantCount(videospace, tiles, thumbnails) {
|
||||||
|
var room = getPoliticTalkConferenceRoom();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (room && typeof room.getParticipants === 'function') {
|
||||||
|
return room.getParticipants().length;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// Fall back to visible tile state when Jitsi internals are unavailable.
|
||||||
|
}
|
||||||
|
|
||||||
|
var localEndpointId = getPoliticTalkLocalEndpointId();
|
||||||
|
var countedIds = {};
|
||||||
|
var candidates = (tiles || []).concat(thumbnails || []);
|
||||||
|
|
||||||
|
if (videospace) {
|
||||||
|
candidates = candidates.concat(getPoliticTalkRenderedParticipantTiles(videospace, 44, 44));
|
||||||
|
}
|
||||||
|
|
||||||
|
candidates.forEach(function(candidate) {
|
||||||
|
if (!candidate || candidate.id === 'localVideo_container') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var endpointId = getPoliticTalkTileEndpointId(candidate);
|
||||||
|
|
||||||
|
if (endpointId && localEndpointId && endpointId === localEndpointId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
countedIds[endpointId || candidate.id || String(Object.keys(countedIds).length)] = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
return Object.keys(countedIds).length;
|
||||||
|
}
|
||||||
|
|
||||||
function isPoliticTalkAvatarShell(element, tile) {
|
function isPoliticTalkAvatarShell(element, tile) {
|
||||||
if (!element || element === tile || element.tagName === 'IMG' || element.tagName === 'CANVAS') {
|
if (!element || element === tile || element.tagName === 'IMG' || element.tagName === 'CANVAS') {
|
||||||
return false;
|
return false;
|
||||||
@@ -2760,7 +2796,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyPoliticTalkLargeVideoLayout(videospace, tiles) {
|
function applyPoliticTalkLargeVideoLayout(videospace, tiles, thumbnails) {
|
||||||
if (!videospace) {
|
if (!videospace) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2774,8 +2810,9 @@
|
|||||||
var candidateTileCount = Array.isArray(tiles) ? tiles.length : 0;
|
var candidateTileCount = Array.isArray(tiles) ? tiles.length : 0;
|
||||||
var renderedTileCount = getPoliticTalkRenderedParticipantTileCount(videospace);
|
var renderedTileCount = getPoliticTalkRenderedParticipantTileCount(videospace);
|
||||||
var visibleTileCount = Math.max(candidateTileCount, renderedTileCount);
|
var visibleTileCount = Math.max(candidateTileCount, renderedTileCount);
|
||||||
|
var remoteParticipantCount = getPoliticTalkRemoteParticipantCount(videospace, tiles, thumbnails);
|
||||||
|
|
||||||
setPoliticTalkDominantSpeakerLayerVisibility(videospace, visibleTileCount <= 1);
|
setPoliticTalkDominantSpeakerLayerVisibility(videospace, remoteParticipantCount > 0 && visibleTileCount <= 1);
|
||||||
|
|
||||||
var availableHeight = getPoliticTalkAvailableTileHeight(videospace);
|
var availableHeight = getPoliticTalkAvailableTileHeight(videospace);
|
||||||
|
|
||||||
@@ -2886,7 +2923,7 @@
|
|||||||
);
|
);
|
||||||
var dominantMetadata = getPoliticTalkDominantSpeakerRoleMetadata(videospace, tiles, thumbnails);
|
var dominantMetadata = getPoliticTalkDominantSpeakerRoleMetadata(videospace, tiles, thumbnails);
|
||||||
|
|
||||||
applyPoliticTalkLargeVideoLayout(videospace, tiles);
|
applyPoliticTalkLargeVideoLayout(videospace, tiles, thumbnails);
|
||||||
applyPoliticTalkTileLayout(videospace, tiles);
|
applyPoliticTalkTileLayout(videospace, tiles);
|
||||||
applyPoliticTalkDominantSpeakerTheme(videospace, tiles, thumbnails, dominantMetadata);
|
applyPoliticTalkDominantSpeakerTheme(videospace, tiles, thumbnails, dominantMetadata);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user