Bug 654787 - part1: Add pref for audio seamless looping; r=jwwang
MozReview-Commit-ID: 1md5AxHG8NA
--- a/dom/media/MediaPrefs.h
+++ b/dom/media/MediaPrefs.h
@@ -208,16 +208,18 @@ private:
// resume background video decoding when the cursor is hovering over the tab.
DECL_MEDIA_PREF("media.resume-bkgnd-video-on-tabhover", ResumeVideoDecodingOnTabHover, bool, false);
// Enable sandboxing support for cubeb
DECL_MEDIA_PREF("media.cubeb.sandbox", CubebSandbox, bool, false);
DECL_MEDIA_PREF("media.videocontrols.lock-video-orientation", VideoOrientationLockEnabled, bool, false);
+ // Media Seamless Looping
+ DECL_MEDIA_PREF("media.seamless-looping", SeamlessLooping, bool, true);
public:
// Manage the singleton:
static MediaPrefs& GetSingleton();
static bool SingletonExists();
private:
template<class T> friend class StaticAutoPtr;
static StaticAutoPtr<MediaPrefs> sInstance;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -446,16 +446,19 @@ pref("media.decoder-doctor.new-issue-end
pref("media.suspend-bkgnd-video.enabled", true);
// Delay, in ms, from time window goes to background to suspending
// video decoders. Defaults to 10 seconds.
pref("media.suspend-bkgnd-video.delay-ms", 10000);
// Resume video decoding when the cursor is hovering on a background tab to
// reduce the resume latency and improve the user experience.
pref("media.resume-bkgnd-video-on-tabhover", true);;
+// Whether to enable media seamless looping.
+pref("media.seamless-looping", true);
+
#ifdef MOZ_WEBRTC
pref("media.navigator.enabled", true);
pref("media.navigator.video.enabled", true);
pref("media.navigator.load_adapt", true);
pref("media.navigator.load_adapt.encoder_only", true);
pref("media.navigator.load_adapt.measure_interval",1000);
pref("media.navigator.load_adapt.avg_seconds",3);
pref("media.navigator.load_adapt.high_load","0.90");