Bug 1555836 - use the pref to dynamically switch vtt debug log. r=heycam

It would be more convenient to use the pref to dynamically switch vtt debug log on/off without changing any code.

Differential Revision: https://phabricator.services.mozilla.com/D33220

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2019-06-13 18:43:08 +00:00
parent 75f83f43fc
commit 7ff878afe4
2 changed files with 5 additions and 2 deletions

View File

@ -32,10 +32,10 @@ const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm")
XPCOMUtils.defineLazyPreferenceGetter(this, "supportPseudo",
"media.webvtt.pseudo.enabled", false);
XPCOMUtils.defineLazyPreferenceGetter(this, "DEBUG_LOG",
"media.webvtt.debug.logging", false);
(function(global) {
var DEBUG_LOG = false;
function LOG(message) {
if (DEBUG_LOG) {
dump("[vtt] " + message + "\n");

View File

@ -464,6 +464,9 @@ pref("media.getusermedia.audiocapture.enabled", false);
// WebVTT pseudo element and class support.
pref("media.webvtt.pseudo.enabled", true);
// WebVTT debug logging.
pref("media.webvtt.debug.logging", false);
// Whether to enable MediaSource support.
pref("media.mediasource.enabled", true);