Open Bug 1557174 Opened 5 years ago Updated 2 years ago

Deprecate non-spec mediaSource constraint (in favor of getDisplayMedia)

Categories

(Core :: WebRTC: Audio/Video, task, P2)

task

Tracking

()

People

(Reporter: jib, Unassigned)

References

Details

(Keywords: dev-doc-needed, site-compat)

A follow-up from bug 1321221 comment 23, now that we've had getDisplayMedia since 66, we should deprecate Firefox's old non-spec API for screen sharing:

navigator.mediaDevices.getUserMedia({video: {mediaSource: "screen"}}); // "screen" or "window"

Before we can turn it off, we want a measure of its use.

We can extrapolate use from two sources:

  1. Use counters we added in bug 1528078: Of a billion pageloads in 68 beta, we see 0.014% (146 thousand pageloads) use navigator.mediaDevices.getUserMedia regardless of mediaSource type.
  2. WEBRTC_GET_USER_MEDIA_TYPE telemetry suggests between 0.48-4.58% of those calls are for screen sharing, depending on whether we believe the beta, dev edition or nightly numbers. Beta has the biggest sampling by far, which is the 0.48% number.

Disclaimer: It's a bit apples to oranges, since the telemetry counts every API call (there could be multiple per page, e.g. from tests), whereas the use counters measure whether or not the API was used at all by a page.

But if we apply the ratio to pageloads, that would mean 0.48%-4.58% of the 146 thousand pageloads were requesting screen sharing, which is 0.00007%-0.00067 (700-6700 pageloads) of a billion.

So far, it sounds like we can remove it.

Unfortunately, the use counts for getDisplayMedia only have like 144 pageloads.

So depending on what metric we use for removal, we should either wait until more people move over, or rip the band aid because there are so few users of this feature.

Keywords: site-compat

Update on metrics (still limited to beta unfortunately). It's more complicated now than comment 0 when getDisplayMedia was relatively new because getDisplayMedia effectively calls getUserMedia({mediaSource: "screen"}}) under the hood, which means it's counted under WEBRTC_GET_USER_MEDIA_TYPE.

  1. In 76 beta, we see 0.067% (1.2 million pageloads) use navigator.mediaDevices.getUserMedia regardless of mediaSource type.
    • This has quadrupled since comment 0, tripled in last few months (likely due to the world right now). Note: This is camera/mic mostly.
  2. WEBRTC_GET_USER_MEDIA_TYPE telemetry suggests (2.73+0.57=) 3.3% of all gUM and gDM calls (not pageloads) are for screen sharing (though note gUM(video + audio) counts as two calls for this particular metric, which means the real number might be as high as 6%: display vs cam+mic-combo).
  3. navigator.mediaDevices.getDisplayMedia is at 0.001% (15 thousand pageloads) or 1.2% of gUM&gDM. At the surface, this fails to account for all of the 3.3-6%, unless the few people who screen-share do it multiple times during a call on average (which is possible).

I think we're going to need better metrics to deduce much more.

Note those were % of pageloads, not % users. WebRTC usage gets drowned out in pageload counts, which don’t account for how long people stay on a page. They were also from beta. Since then we've gotten better numbers: 2.3% of release users used camera/mic and 0.09% or 4% of those (maybe 6% due to comment 1) shared their screen on average a week ago.

Blocks: 1679735
Blocks: 1705289
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.