Code Monkey home page Code Monkey logo

Comments (3)

cketti avatar cketti commented on May 20, 2024

I hope the code makes it pretty obvious that keeping the DOM order was very much intended. I'm guessing you're more interested in the "why".
One thing I remember is that video tiles for new participants are added before the local video tile (your video tile) in the DOM. That's not a great user experience if you are changing the DOM order and you have reordered your video tile to not be at the end. There might have been some other UI issues when changing the DOM order. I probably should have written this down 😞

from jitsi-hacks.

jacksongoode avatar jacksongoode commented on May 20, 2024

Sorry, yes the "why". I have a listener to find the index of each participant's video to do some manipulation with the audio. Do you think it would be fine in removing the function to retain the old order in your script?

from jitsi-hacks.

cketti avatar cketti commented on May 20, 2024

Just try it. I didn't like the user experience, but maybe it's fine for you. You could also change your code to either not use an index, but participant IDs, or to transform the display index to a DOM index (or vice versa). See

// Sort video tile elements by display order (CSS 'order' property)
const sortedTiles = videoTiles.slice().sort((a,b) => parseInt(a.style.order, 10) - parseInt(b.style.order, 10));

from jitsi-hacks.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.