-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Validate IDs and labels of remote audio and video tracks #55873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Validate IDs and labels of remote audio and video tracks #55873
Conversation
|
Stream IDs are communicated in SDP and are always accurate. Track IDs are... a bit of a mess. When you The track ID being present in SDP is just for backwards compatibility, it's not something you can rely on |
|
IIRC if the receiver was created in response to SDP from the other side and that other side happened to have the track set by the time the m-section was formed for the first time, then the track identifier will probably match, otherwise it will probably not match |
|
It would be less foot-gunny if we never had the track ID match just to avoid people depending on this, but I don't want to change anything that is already de facto standard... ramble ramble. WPTs are good. |
|
The WEBRTC spec claims that the track IDs are uncorrelated - this was a result of the discussion around the decision to incorporate ReplaceTrack as a function not requiring a new offer/answer. (The stream IDs are carried over). The msid spec RFC claims (I think) that the track ID will be set from the MSID attribute - this was locked down as an RFC before we decided to change the way track IDs behaved in the WEBRTC spec, I believe. |
| function testTrackId(localTrack, remoteTrack, kind) | ||
| { | ||
| test(() => { | ||
| assert_not_equals(localTrack.id, remoteTrack.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface says
Let track be a new MediaStreamTrack object [GETUSERMEDIA]. The source of track is a remote source provided by receiver. Note that the track.id is generated by the user agent and does not map to any track IDs on the remote side.
If the IDs are random, the test will occasionally fail; if the IDs are obeying the older rule, they will collide.
Not sure if the test is appropriate or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the IDs are obeying the older rule, they will collide.
That is what we want to test.
I can remove it from now, or update the test to create 10 connections with the same track ID on the local track and verify that at lease one of the remote track has a different ID.
If the IDs are random, the test will occasionally fail
Most likely, UUIDs will be used, at which point the collisions are very unlikely.
Maybe the spec should say so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test updated.
baaff96 to
026978c
Compare
|
FWIW, the compat issue we identified was related to remote track labels. We haven't identified a compat issue related to the the track ids, but it seems best to converge there as well. |
|
As per my reading of the spec, MediaStreamTrack.id is |
|
I filed w3c/webrtc-pc#3084 |
No description provided.