VideoRoom track's owner identification
See original GitHub issueParticipant identification
Jitsi just like Membrane support multiple peers on a single shared peer connection.
There is a problem of identifying each peer based on the incoming tracks. The SFU needs to keep track of its participants (things like display name ect.) and pass that information to the client when needed.
How Jitsi does that?
The low-level code that is responsible for identifying incoming tracks with participants is available here:
Jitsi listens on remote tracks being added. Then it does manual search on the remoteDescription.sdp
string to obtain necessary information.
First it checks the transceiver for mid
field, if not found then if falls back to searching for msid
that equals to the current stream id.
(It all depends on what plan the browser is using but as far as I know Unifed Plan is now a standard).
Then the sdp is filtered for lines that include mid
or msid
fields that has been found in previous step.
In resulting lines we filter out received lines to get corresponding ssrc
.
The main goal here is to obtain corresponding ssrc
of incoming track. Then a request is sent
to the server with given ssrc
to return track’s participant id. And further down the line if participant
is not in client’s cache, again a request is sent to obtain participant’s information.
How should we do that?
What fields can we use to query information about given participant? Each participant will see the same mid
values,
from what I recall msid
will differ for each participant same goes with ssrc
and when querying the server it will
have to identify the caller to get the proper mapping of outgoing streams (with mid
it can do a really quick check).
And how should we get participants information, after getting a new track by sending query request or the server itself should first send information about incoming participant?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
Top GitHub Comments
Couldn’t we just send the mapping of
(mid/msid/whatever) => user_data
along with SDP? This case is a bit different than screensharing, at least if we assume that the user data changes only when SDP changes.Maybe. It’s worth mentioning that besides ssrc there is also
cname
which stands forcanonical name
and is probably more valuable id than ssrc.