Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

71
Views
How to reoder video tiles in Jitsi?

Last year, I wrote a bookmarklet that allowed to reorder Jitsi video tiles in alphabetic order.

Unfortunately, the script does not seem to work with the recent Jitsi versions anymore. I have already adjusted the access to the required elements, this is working fine again. However, the order: n attribute of the elements is ignored know, even when I set the parent to display:flex, remove the position: absolute and the left|top:n px. I played around with the CSS and looked into documentation, but given I am no frontender, I am currently stuck.

How can I change the CSS, so that the tiles are reordered?

As a clarification, I am only looking for where I need which changes in the CSS, no scripted solution. I can take care of the scripting. Achieving a swap of two video tiles while not breaking the look would be sufficient probably.

The below information are not necessary, but might be helpful to answer the question. Below is a screenshot showing the position in the DOM tree:

DOM tree leading to the video tiles (seems I need more reputation to embed the image)

And here is the the javascript that allows to directly access the elements:

var numberOfVideos;

  function getNumberOfParticipants(){
    // works
  }

  function getNameOfParticipant(i){
     var container = $('#remoteVideos')[0];
     var jChildren = $(container).children();
     var jChildren2 = jChildren[1].firstChild.children;
     return [jChildren2[i].getElementsByClassName("displayname")[0].innerHTML, jChildren2[i] ];
  }

  function sortParticipants(){
    numberOfVideos = getNumberOfParticipants();

    var names = new Array();

    //only applicable in tiles mode!
    for(i=0; i<numberOfVideos; i++) {
      names[i] = new Array (2);
      names[i] = getNameOfParticipant(i);
    }

    //sort Array
    names.sort((a, b) => a[0].localeCompare(b[0]));

    //reorder the tiles
    for(i = 0; i < numberOfVideos; i++){
      $(names[i][1]).css('order', i); //this is the line that worked in 2021, but the `order` attribute is now being ignored
    }
  }

https://github.com/kaiyazeera/jitsi-bookmarklets/blob/master/alphabeticSort-auto0.js

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The problem could be solved by modfying the global CSS:

var css = document.createElement("style");
css.type = "text/css";
css.innerHTML = ".videocontainer { position:relative !important; top: unset !important; left: unset !important; text-align:center;overflow:hidden;  }"

var css2 = document.createElement("style");
css2.type = "text/css";
css2.innerHTML = ".tile-view .remote-videos > div {flex-wrap:wrap;}"

document.body.appendChild(css)
document.body.appendChild(css2)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!