Bug 1247056 - Show notification when PulseAudio cannot be used - r=gijs draft
authorGerald Squelart <gsquelart@mozilla.com>
Tue, 13 Sep 2016 20:10:58 -0700
changeset 417926 3b0409dbb4e9
parent 417925 beed73472f87
child 417927 ada8058d8f71
push id30524
push usergsquelart@mozilla.com
push dateTue, 27 Sep 2016 09:30:55 +0000
reviewersgijs
bugs1247056
milestone52.0a1
Bug 1247056 - Show notification when PulseAudio cannot be used - r=gijs MozReview-Commit-ID: 4q4CLb9VjcU
browser/base/content/browser-media.js
browser/locales/en-US/chrome/browser/browser.properties
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -226,23 +226,29 @@ let gDecoderDoctorHandler = {
       }
       if (AppConstants.isPlatformAndVersionAtLeast("win", "6")) {
         return gNavigatorBundle.getString("decoder.noHWAccelerationVista.message");
       }
       if (AppConstants.platform == "linux") {
         return gNavigatorBundle.getString("decoder.noCodecsLinux.message");
       }
     }
+    if (type == "cannot-initialize-pulseaudio") {
+      return gNavigatorBundle.getString("decoder.noPulseAudio.message");
+    }
     return "";
   },
 
   getSumoForLearnHowButton(type) {
     if (AppConstants.platform == "win") {
       return "fix-video-audio-problems-firefox-windows";
     }
+    if (type == "cannot-initialize-pulseaudio") {
+      return "fix-common-audio-and-video-issues";
+    }
     return "";
   },
 
   receiveMessage({target: browser, data: data}) {
     let box = gBrowser.getNotificationBox(browser);
     let notificationId = "decoder-doctor-notification";
     if (box.getNotificationWithValue(notificationId)) {
       return;
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -729,16 +729,17 @@ pendingCrashReports.alwaysSend = Always 
 decoder.noCodecs.button = Learn how
 decoder.noCodecs.accesskey = L
 decoder.noCodecs.message = To play video, you may need to install Microsoft’s Media Feature Pack.
 decoder.noCodecsVista.message = To play video, you may need to install Microsoft’s Platform Update Supplement for Windows Vista.
 decoder.noCodecsXP.message = To play video, you may need to enable Adobe’s Primetime Content Decryption Module.
 decoder.noCodecsLinux.message = To play video, you may need to install the required video codecs.
 decoder.noHWAcceleration.message = To improve video quality, you may need to install Microsoft’s Media Feature Pack.
 decoder.noHWAccelerationVista.message = To improve video quality, you may need to install Microsoft’s Platform Update Supplement for Windows Vista.
+decoder.noPulseAudio.message = To play audio, you may need to install the required PulseAudio software.
 
 permissions.remove.tooltip = Clear this permission and ask again
 
 # LOCALIZATION NOTE (aboutDialog.architecture.*):
 # The sixtyFourBit and thirtyTwoBit strings describe the architecture of the
 # current Firefox build: 32-bit or 64-bit. These strings are used in parentheses
 # between the Firefox version and the "What's new" link in the About dialog,
 # e.g.: "48.0.2 (32-bit) <What's new>" or "51.0a1 (2016-09-05) (64-bit)".