webrtc-internals does not work with native addTrack |
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/63.0.3239.84 Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce the problem: 1. go to https://webrtc.github.io 2. open chrome://webrtc-internals 3. paste this into the JS console: var pc = new RTCPeerConnection(); navigator.mediaDevices.getUserMedia({audio: true}) .then(stream => { pc.addTrack(stream.getTracks()[0], stream); return pc.createOffer(); }) What is the expected behavior? webrtc-internals shows the addTrack API call What went wrong? It only shows createOffer -- but from the SDP one can infer that a track was added Did this work before? No Does this work in other browsers? Yes Chrome version: 65.0.3315.3 Channel: n/a OS Version: Flash Version:
,
Jan 11 2018
probably doesn't work with ontrack either. hbos: https://codesearch.chromium.org/chromium/src/content/renderer/media/rtc_peer_connection_handler.cc --- see all the peer_connection_tracker_ stuff
,
Jan 12 2018
hbos@: can you take a look?
,
Jan 12 2018
,
Jan 12 2018
,
Jan 17 2018
Related: https://crbug.com/803062
,
Jan 17 2018
,
Feb 8 2018
,
Feb 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/85000e8aea2a9b14b0618cf8351ffbcd5110e123 commit 85000e8aea2a9b14b0618cf8351ffbcd5110e123 Author: Henrik Boström <hbos@chromium.org> Date: Mon Feb 12 10:52:40 2018 Redefine legacy addStream()/removeStream() on top of track-based APIs. Implementation: - addStream() is defined in terms of addTrack() and adding a listener of tracks being added/removed from the stream. The listener uses addTrack()/removeTrack(). - removeStream() is defined in terms of removeTrack() and removing the listener of tracks being added/removed from the stream. This fixes: https://crbug.com/738929 Related bug fixes: - By getting rid of local_streams_, this also fixes the issue where createDTMFSender() could only be called for tracks added with the legacy APIs. https://crbug.com/806875 - By adding code checking if a stream was the first/last stream added/removed, the chrome://webrtc-internals events related to adding or removing a stream are triggered by addTrack/removeTrack, fixing the bug where addTrack-streams did not appear in chrome://webrtc-internals. https://crbug.com/801093 Old code no longer exercised is removed. MockPeerConnectionImpl is updated to work with track-based APIs. We should get rid of this class in future CLs, it's a maintenance burden. Design doc: https://docs.google.com/document/d/1Obbeg-B4_04twVctHdf7C7vkUQrGlLvOaV0C8J5_-Gs/edit?usp=sharing Bug: 738929 , 803021 , 806875 , 801093 Change-Id: I77541a3dce180e1cf8b311cb7803047215b0af7b Reviewed-on: https://chromium-review.googlesource.com/899346 Commit-Queue: Henrik Boström <hbos@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Harald Alvestrand <hta@chromium.org> Cr-Commit-Position: refs/heads/master@{#536052} [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/content/renderer/media/webrtc/mock_peer_connection_impl.cc [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/content/renderer/media/webrtc/mock_peer_connection_impl.h [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/content/renderer/media/webrtc/rtc_peer_connection_handler.cc [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/content/renderer/media/webrtc/rtc_peer_connection_handler.h [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/content/renderer/media/webrtc/rtc_peer_connection_handler_unittest.cc [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/content/renderer/media/webrtc/rtc_rtp_sender.cc [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/content/renderer/media/webrtc/rtc_rtp_sender.h [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-AddRemoveTrack.html [delete] https://crrev.com/b7e3a91cb94a9f47a8ebbef7a887d31069c18aac/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-legacy-stream-APIs-expected.txt [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.h [modify] https://crrev.com/85000e8aea2a9b14b0618cf8351ffbcd5110e123/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
,
Feb 12 2018
With the above CL, webrtc-internals should now work with addTrack() but it will look the same as if addStream() was used, which is not entirely correct. AI: Should verify and make file a separate bug if webrtc-internals need more updating.
,
Feb 12 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by krajshree@chromium.org
, Jan 11 2018