Closed Bug 1180109 Opened 9 years ago Closed 9 years ago

Add telemetry to report when WMF is broken and thus <video> won't work on Windows

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

Attachments

(1 file)

We should add telemetry to report when WMF is non functional (as per bug 1180108), so that we can figure out how big the "<video> doesn't work because WMF is non functional" problem is.
Assignee: nobody → cpearce
Add telemetry to report soon after startup whether Windows Media Foundation is functional on Win Vista and later. We use WMF for decoding H.264/AAC videos for the <video> element on Windows Vista and later, and we suspect that for some proportion of our users, it's either been broken by apps like Codec Tweak Tool, or the user has not installed it yet (Enterprise N and KN versions of Windows, Vista without the Platform Update Supplement service pack).

This patch enables us to figure out how big the problem is.

r? dolske for the Firefox change.
r? vladan for opt-out Telemetry.
Attachment #8633751 - Flags: review?(vdjeric)
Attachment #8633751 - Flags: review?(dolske)
Component: Video/Audio → General
Product: Core → Firefox
Summary: Add telemetry to report when WMF is broken → Add telemetry to report when WMF is broken and thus <video> won't work on Windows
Comment on attachment 8633751 [details] [diff] [review]
Patch: Add telemetry to Firefox to detect when Windows Media Foundation broken

Review of attachment 8633751 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/telemetry/Histograms.json
@@ +5928,5 @@
> +  "VIDEO_CAN_CREATE_H264_DECODER": {
> +    "alert_emails": ["cpearce@mozilla.com"],
> +    "expires_in_version": "50",
> +    "kind": "boolean",
> +    "description": "Whether we can create an WMF H.264 video decoder.",

Mention that these histograms record a single value on every startup
Attachment #8633751 - Flags: review?(vdjeric) → review+
Comment on attachment 8633751 [details] [diff] [review]
Patch: Add telemetry to Firefox to detect when Windows Media Foundation broken

Review of attachment 8633751 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/browser.js
@@ +1433,5 @@
> +    let winver = window.navigator.userAgent.match(/Windows NT (\d+\.\d)/);
> +    let isVistaOrLater = winver &&
> +                         winver.length == 2 &&
> +                         parseFloat(winver[1]) >= 6.0;
> +    if (isVistaOrLater) {

Using |navigator| is a bit gross (and might be wrong if overridden, although I'm not sure if that applies to chrome windows). In any case, better to check as:

if (parseFloat(Services.sysinfo.getProperty("version")) > 6) { ... }

or if you want to be new and fancy about it:

if (AppConstants.isPlatformAndVersionAtLeast("win", "6")) { ... } 

(Feel free to keep the isVistaOrLater var, I find that generally helps with readability / understanding.)
Attachment #8633751 - Flags: review?(dolske) → review+
Oh, belated thought: telemetry.mo can do filtering by platform and version, so you might consider collecting this everywhere, and looking at just Vista+ by filtering the reports. But fine either way.
(In reply to Justin Dolske [:Dolske] from comment #5)
> Oh, belated thought: telemetry.mo can do filtering by platform and version,
> so you might consider collecting this everywhere, and looking at just Vista+
> by filtering the reports. But fine either way.

Collecting everywhere sounds like a great idea.
https://hg.mozilla.org/mozilla-central/rev/93f3f80771cb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: