How to get the resolution of remote tracks?

When I receive remote tracks, how to get the resolution of them?

I have done it in the following way. Once you have your JitsiConference instance, subscribe to this event:

conference.on(, (statsData) => {
    for (const participantId of participantIds) {
        const resolution = statsData.resolution[participantId]

Given that you already have a list of participantIds that you obtained from participant joined events, then you can get the current resolution for each participant as in the example. The stats updated events are fired at regular intervals.

what’s the “statsData” in your code?

I did a typo in the sample, now adjusted it. statsData is the object that is passed to the event handler. You can do console.log(statsData) and inspect the contents, it has a lot of information.

thx, I will try it.