diff --git a/browser/actors/DecoderDoctorParent.jsm b/browser/actors/DecoderDoctorParent.jsm index ad8bcc0684dc..703260b969df 100644 --- a/browser/actors/DecoderDoctorParent.jsm +++ b/browser/actors/DecoderDoctorParent.jsm @@ -23,14 +23,16 @@ XPCOMUtils.defineLazyGetter(this, "gNavigatorBundle", function() { }); class DecoderDoctorParent extends JSWindowActorParent { - getLabelForNotificationBox(type) { + getLabelForNotificationBox({ type, decoderDoctorReportId }) { if (type == "platform-decoder-not-found") { - if (AppConstants.platform == "win") { + if (decoderDoctorReportId == "MediaWMFNeeded") { return gNavigatorBundle.GetStringFromName( "decoder.noHWAcceleration.message" ); } - if (AppConstants.platform == "linux") { + // Although this name seems generic, this is actually for not being able + // to find libavcodec on Linux. + if (decoderDoctorReportId == "MediaPlatformDecoderNotFound") { return gNavigatorBundle.GetStringFromName( "decoder.noCodecsLinux.message" ); @@ -55,10 +57,10 @@ class DecoderDoctorParent extends JSWindowActorParent { return ""; } - getSumoForLearnHowButton(type) { + getSumoForLearnHowButton({ type, decoderDoctorReportId }) { if ( type == "platform-decoder-not-found" && - AppConstants.platform == "win" + decoderDoctorReportId == "MediaWMFNeeded" ) { return "fix-video-audio-problems-firefox-windows"; } @@ -134,7 +136,10 @@ class DecoderDoctorParent extends JSWindowActorParent { if (!/^\w+$/im.test(decoderDoctorReportId)) { return; } - let title = this.getLabelForNotificationBox(type); + let title = this.getLabelForNotificationBox({ + type, + decoderDoctorReportId, + }); if (!title) { return; } @@ -176,7 +181,7 @@ class DecoderDoctorParent extends JSWindowActorParent { } let buttons = []; - let sumo = this.getSumoForLearnHowButton(type); + let sumo = this.getSumoForLearnHowButton({ type, decoderDoctorReportId }); if (sumo) { buttons.push({ label: gNavigatorBundle.GetStringFromName("decoder.noCodecs.button"),