summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dom/media/DecoderTraits.cpp15
-rw-r--r--modules/libpref/init/all.js4
2 files changed, 17 insertions, 2 deletions
diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp
index 19596572a0..d4968c0b4e 100644
--- a/dom/media/DecoderTraits.cpp
+++ b/dom/media/DecoderTraits.cpp
@@ -278,9 +278,20 @@ DecoderTraits::CanHandleContentType(const MediaContentType& aContentType,
bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType,
DecoderDoctorDiagnostics* aDiagnostics)
{
+ // Prior to Issue #1977, we always pop-up the download prompt when
+ // wave files are opened directly. This was considered inconsistent
+ // since we play wave files when they're inside an HTML5 audio tag
+ // anyway. However, there may be users who depended on this old
+ // behavior, where they use their helper apps to open WAV audio
+ // instead. We should allow this old behavior behind a pref for
+ // those who want it.
+ if (!Preferences::GetBool("media.wave.play-stand-alone", true)) {
+ return false;
+ }
+
// If an external plugin which can handle quicktime video is available
- // (and not disabled), prefer it over native playback as there several
- // codecs found in the wild that we do not handle.
+ // (and not disabled), prefer it over native playback as there are
+ // several codecs found in the wild that we do not handle.
if (nsDependentCString(aMIMEType).EqualsASCII("video/quicktime")) {
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
if (pluginHost &&
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index d17082364a..4a57e5fcaa 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -361,6 +361,10 @@ pref("media.wakelock_timeout", 2000);
// opened as top-level documents, as opposed to inside a media element.
pref("media.play-stand-alone", true);
+// Whether we should play wave files opened in a "media document", i.e. wave
+// audio opened as top-level documents, as opposed to inside a media element.
+pref("media.wave.play-stand-alone", true);
+
pref("media.hardware-video-decoding.enabled", true);
pref("media.hardware-video-decoding.force-enabled", false);