We should not unload tabs with webrtc peer connections
Categories
(Firefox :: Tabbed Browser, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: toshi, Assigned: toshi)
References
(Regressed 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The tab unloader deprioritizes tabs with webrtc streams. Here are the ideas from the media team. We should check at least HasActivePeerconnections
.
-
media recorder needs a stream to record, so it should be covered by
browserHasStreams
. It looks likebrowserHasStreams
covers tracks fromgetUserMedia
andgetDisplayMedia
. There could also be ones generated from canvas capture and webAudio. canvases are not rendered in background tabs so canvas capture is not very useful then. -
Media recorder typically is being used to record a stream from a camera/mic, as pehrsons says, or maybe from a Peerconnection (but that would be covered by
HasActivePeerconnections
). A WebAudio or screencapture source would be about the only thing not covered; I don't know if there are easy ways to check if mediarecorder is in use; I don't think there is. pehrsons that does remind me that tabs usingMediaRecorder
shouldn't be allowed in the bfcache, though...
Assignee | ||
Comment 1•3 years ago
|
||
This patch makes sure the Tab Unloading feature does not unload tabs that have
active peer connections not to disrupt browsing experience based on WebRTC peer
connections.
To enable JS code to access the number of active peer connections, this patch
moves nsPIDOMWindowInner::mTotalActivePeerConnections
to WindowContext
as
a synched field of the top window.
Comment 3•3 years ago
|
||
bugherder |
Description
•