New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 738918 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 803021
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 700916
issue 803021
issue 738929



Sign in to add a comment

RTCPeerConnection.getLocalStreams() should return all streams of all senders

Project Member Reported by hbos@chromium.org, Jul 3 2017

Issue description

We implement the non-standards addStream/removeStream which add and remove from a set of streams that can be gotten with getLocalStreams.

When addTrack/removeTrack/replaceTrack is added, the relationship between streams and tracks are not defined by a set of "local streams" but by a set of senders. Multiple senders might send the same track or the same sender might be associated with multiple streams (lower layer only supports 1 stream per sender at the moment though).

In order to match Firefox's behavior, addTrack with a stream should add to the set of local streams, and removeTrack/replaceTrack might remove from it.

getLocalStreams() should be implemented by iterating senders and looking at their associated streams. Only when the number of senders using a particular stream reaches zero should it no longer be included in the result.
 

Comment 1 by hbos@chromium.org, Jul 3 2017

Cc: deadbeef@chromium.org
+deadbeef: FYI this might not be what we initially expected from getLocalStreams() but considering the blink layer implements this with its own set of local streams, and doesn't rely on webrtc::PeerConnectionInterface::local_streams(), I can fix this in the blink layer. We might consider removing local_streams() instead of updating it to do the same?

Comment 2 by hbos@chromium.org, Jul 3 2017

Firefox polyfills so that addStream is equivalent to looping through tracks of the stream and doing addTrack(track, stream). When getLocalStreams() is compatible with this we should define our addStream and removeStream the same way, if possible.

Comment 3 by hbos@chromium.org, Jul 3 2017

Blocking: 738929

Comment 4 by deadbeef@webrtc.org, Jul 18 2017

@comment #1: Sounds good to me. The less layers we can keep the "legacy" methods in, the better. Though I doubt "local_streams()" is something we can trivially remove; probably will require a PSA.
Labels: -M-61 M-62
Changing milestone to M62. Please correct if that's wrong.

Comment 6 by hbos@chromium.org, Aug 29 2017

Labels: -M-62 M-63

Comment 7 by hbos@chromium.org, Sep 13 2017

Cc: guidou@chromium.org niklase@chromium.org hbos@chromium.org
 Issue 764414  has been merged into this issue.

Comment 8 by hbos@chromium.org, Jan 17 2018

Labels: -M-63 M-66
I expect this to be done within a milestone once started, but if we prioritize transceivers over deprecating/removing legacy this may be further bumped to 67+.

Comment 9 by hbos@chromium.org, Jan 17 2018

Blocking: 803021

Comment 10 by hbos@chromium.org, Jan 29 2018

Mergedinto: 803021
Status: Duplicate (was: Started)

Sign in to add a comment