onRemoteTrackAdded: videoType is showing the previous remote track's videoType

Hello Everyone!

So I’m currently using the lib-jitsi-meet API and I seem to have experienced an issue.
It seems that when I try to open up the camera/ sharescreen the videoType I’m getting is incorrect (it is showing the previous one instead)
but when I look at the console.log, it is returning it properly.
Is there a way to get the videoType correctly? Do I need to await it?

Any help would be greatly appreciated


There is a re-producible jitsi-meet fork on github.

What I see now, seems the ORDER of the “peerconnection ‘track’ event” and “PRESENCE_RECEIVED” are changed.

“peerconnection ‘track’ event” did NOT triggered BEFORE “PRESENCE_RECEIVED”

hope someone can help this, many thanks