static/webrtc.js
//-------------update CSS grid based on number of diplayed videos
update CSS grid based on number of diplayed videos
update CSS grid based on number of diplayed videos
function updateLayout() {
  var rowHeight = '98vh';
  var colWidth = '98vw';
  var numVideos = Object.keys(peerConnections).length + 1 ; 
  if (numVideos > 1 && numVideos <= 4) { 
    rowHeight = '48vh';
    colWidth = '48vw';
  } else if (numVideos > 4) { 
    rowHeight = '32vh';
    colWidth = '32vw';
  }
  document.documentElement.style.setProperty(`--rowHeight`, rowHeight);
  document.documentElement.style.setProperty(`--colWidth`, colWidth);
}
function updateLayout ( ) { var rowHeight = '98vh' ; var colWidth = '98vw' ; var numVideos = Object . keys ( peerConnections ) . length + 1 ; if ( numVideos > 1 && numVideos <= 4 ) { rowHeight = '48vh' ; colWidth = '48vw' ; } else if ( numVideos > 4 ) { rowHeight = '32vh' ; colWidth = '32vw' ; } document . documentElement . style . setProperty ( ` ` , rowHeight ) ; document . documentElement . style . setProperty ( ` ` , colWidth ) ; }
update CSS grid based on number of diplayed videos
update CSS grid based on number of diplayed videos
// add one to include local video // 2x2 grid // 3x3 grid