Open Bug 1551724 Opened 5 years ago Updated 2 years ago

Allow background throttling of PeerConnections

Categories

(Core :: WebRTC, enhancement, P3)

enhancement

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)?

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.

Byron what are your thoughts on allowing more throttling based on the ICE state of PeerConnections (see #c0)?

Flags: needinfo?(docfaraday)

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.

Flags: needinfo?(docfaraday)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.