Allow background throttling of PeerConnections
Categories
(Core :: WebRTC, enhancement, P3)
Tracking
()
People
(Reporter: drno, Unassigned)
Details
As pointed out by jesup in #media currently BudgetThrottlingEnabled() https://searchfox.org/mozilla-central/rev/116bd975c30746ddefc3d20e6947d1871469354f/dom/base/TimeoutManager.cpp#1331 just calls HasActivePeerConnections() to not throttle a page.
CanSavePresentation() also calls HasActivePeerConnections(). But these two are asking different questions.
It might be time to allow throttling of PeerConnections which are in closed state or where ICE has failed.
The more tricky question is if we could also allow throttling if a page has PeerConnections which have only locally gathered, but never saw a remote description nor any remote candidates (in other words where ICE never made it to connecting)?
Reporter | ||
Comment 1•5 years ago
|
||
Looking at the code this check appears to be useless https://searchfox.org/mozilla-central/rev/116bd975c30746ddefc3d20e6947d1871469354f/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp#2494
as I don't find anything ever setting the state to PCImplIceConnectionState::Closed.
Reporter | ||
Comment 2•5 years ago
|
||
Byron what are your thoughts on allowing more throttling based on the ICE state of PeerConnections (see #c0)?
Comment 3•5 years ago
|
||
That is one way to do it. I might go further and say the thing we should check is gUM. Throttling a background DataChannel only PC is probably not going to cause too much grief, provided the throttling isn't excessive.
Updated•2 years ago
|
Description
•