Closed Bug 1531803 Opened 6 years ago Closed 6 years ago

RTCTrackEvent-fire.html wpt wants ontrack events when a=msid is altered in remote description

Categories

(Core :: WebRTC: Signaling, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bwc, Assigned: bwc)

References

Details

Attachments

(7 files, 1 obsolete file)

This is pretty debatable, because the JSEP spec forbids a=msid changing, which implies an expectation that JS won't see new tracks unless a transceiver is added. On the other hand, it was not always this way, and existing JS might want to see the events.

As I recall, we deprecated msid for identification in favor of mid, removing the track id part that made them unique. Its remaining use: keeping track of stream associations, which can change with sender.setStreams() (bug 1510802), causing events. E.g. two tracks in the same stream now have the same msid.

I think this renders the following JSEP text obsolete: "For RtpTransceivers that are not stopped, the "a=msid" line(s) MUST stay the same if they are present in the current description, regardless of changes to the transceiver's direction or track."

If I didn't want to change JSEP, I'd narrowly interpret this as: "must not change when the track changes", and since we've removed the relevant part it was speaking to (the unique track id), we can ignore it.

Rank: 18
Priority: -- → P2

Just to be clear, your opinion is that this check should be removed?

Flags: needinfo?(jib)

Sorry for not being clear: the check is correct and should stay. I meant "JSEP spec forbids a=msid changing" is obsolete.

MSID reflects stream associations, which can change according to webrtc-pc, and must fire events. From SRD(offer):

  1. If direction is "sendrecv" or "recvonly", let msids be a list of the MSIDs that the media description indicates transceiver.[[Receiver]].[[ReceiverTrack]] is to be associated with. Otherwise, let msids be an empty list.

  2. Set the associated remote streams given transceiver.[[Receiver]], msids, addList, and removeList.

  3. If the previous step increased the length of addList, or if transceiver's [[FiredDirection]] slot is neither "sendrecv" nor "recvonly", process the addition of a remote track for the media description, given transceiver and trackEventInits.

Flags: needinfo?(jib)

As much as I dislike the JSEP spec around this, I don't think your narrow interpretation holds up. The jsep draft says that a=msid is invariant until the transceiver is stopped, and this is purposeful. Definitely, we should not be changing our own a=msid attributes (unless draft-jsep is changed, which would require us to raise an almighty fuss at this point).

Let's bring this up on w3c.

The jsep draft says that a=msid is invariant until the transceiver is stopped, and this is purposeful.

What purpose does that solve when it is no longer unique? E.g. the typical case of a stream with an audio track and a video track, the tracks will both have the same msid now.

Let's bring this up on w3c.

Please file an issue on webrtc-pc or jsep if you think there is an issue here.

(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #5)

The jsep draft says that a=msid is invariant until the transceiver is stopped, and this is purposeful.

What purpose does that solve when it is no longer unique? E.g. the typical case of a stream with an audio track and a video track, the tracks will both have the same msid now.

Exactly the question I asked here: https://github.com/w3c/webrtc-pc/issues/2115

Ok, so it looks like the consensus is that JSEP is buggy here, and we're going to surface this to JS.

Assignee: nobody → docfaraday
Attachment #9054068 - Attachment is obsolete: true
Blocks: 1542907

Wow, what happened on try there? Oranges in lots of unrelated tests... I think I'll rebase and see if it is less of a mess.

Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/86910675df13 Part 0: Re-enable a couple of tests. r=jib https://hg.mozilla.org/integration/autoland/rev/cbe9386e0d7a Part 1: Stop copying the previous msid when generating new SDP. r=mjf https://hg.mozilla.org/integration/autoland/rev/14e1bfbd0060 Part 2: Get rid of JsepTrack::GetTrackId (since it doesn't mean anything), and re-focus on stream ids. r=mjf https://hg.mozilla.org/integration/autoland/rev/f8a6a019f873 Part 3: Only set track id on JsepTrack if we're configured to emit track ids in SDP, and simplify some code. r=mjf https://hg.mozilla.org/integration/autoland/rev/4864459fde54 Part 4: Remove some track-id-centric ChromeOnly API on RTCRtpTransceiver. r=jib,smaug https://hg.mozilla.org/integration/autoland/rev/6bf3fd241bb8 Part 5: Rework local track checking in our mochitests to ignore track ids, and decruft. r=jib https://hg.mozilla.org/integration/autoland/rev/d2ba7da778f0 Part 6: Fire track events when that track has been added to a stream. r=jib,smaug
Regressions: 1591854
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: