From 41bc10b9cb6c50da684d91da156bd4520e48b066 Mon Sep 17 00:00:00 2001 From: Pale Moon Date: Sat, 22 Oct 2016 16:45:29 +0200 Subject: Add UI front-end for MSE preferences. --- browser/components/preferences/content.js | 14 ++++++++++++++ browser/components/preferences/content.xul | 19 +++++++++++++++++++ .../en-US/chrome/browser/preferences/content.dtd | 10 ++++++++++ 3 files changed, 43 insertions(+) diff --git a/browser/components/preferences/content.js b/browser/components/preferences/content.js index 3a5e21622..1016d11e9 100644 --- a/browser/components/preferences/content.js +++ b/browser/components/preferences/content.js @@ -32,6 +32,20 @@ var gContentPane = { return undefined; }, + /** + * Utility function to enable/disable the checkboxes for MSE formats depending + * on the value of media.mediasource.enabled. + */ + updateMSE: function () + { + var checkboxMSEMP4 = document.getElementById('videoMSEMP4'); + var checkboxMSEWebM = document.getElementById('videoMSEWebM'); + var preference = document.getElementById('media.mediasource.enabled'); + checkboxMSEMP4.disabled = preference.value != true; + checkboxMSEWebM.disabled = preference.value != true; + return undefined; + }, + // BEGIN UI CODE /* diff --git a/browser/components/preferences/content.xul b/browser/components/preferences/content.xul index 94201edbf..09cf3351b 100644 --- a/browser/components/preferences/content.xul +++ b/browser/components/preferences/content.xul @@ -31,6 +31,12 @@ name="font.language.group" type="wstring" onchange="gContentPane._rebuildFonts();"/> + + + + + +