Bug 493217 - Add an Appearances->Media preferences panel to permit confguring media.autoplay.enabled. r=rsx11m,frg
authorBill Gianopoulos <wgianopoulos@gmail.com>
Sun, 04 Mar 2018 18:02:56 -0500
changeset 31266 2c6f407415f224bb52d04aea0950e9edb9adeade
parent 31265 04e68359ee5160785d01a2e22f7b9229688333d1
child 31267 3d883f9f14a9898be052f305df7d66de218e095b
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersrsx11m, frg
bugs493217
Bug 493217 - Add an Appearances->Media preferences panel to permit confguring media.autoplay.enabled. r=rsx11m,frg
suite/common/jar.mn
suite/common/pref/pref-media.xul
suite/common/pref/preferences.xul
suite/locales/en-US/chrome/common/help/cs_nav_prefs_appearance.xhtml
suite/locales/en-US/chrome/common/help/suite-toc.rdf
suite/locales/en-US/chrome/common/pref/pref-media.dtd
suite/locales/en-US/chrome/common/pref/preferences.dtd
suite/locales/jar.mn
--- a/suite/common/jar.mn
+++ b/suite/common/jar.mn
@@ -214,16 +214,17 @@ comm.jar:
    content/communicator/pref/pref-languages.js                      (pref/pref-languages.js)
    content/communicator/pref/pref-languages.xul                     (pref/pref-languages.xul)
    content/communicator/pref/pref-languages-add.xul                 (pref/pref-languages-add.xul)
    content/communicator/pref/pref-languages-add.js                  (pref/pref-languages-add.js)
    content/communicator/pref/pref-links.js                          (pref/pref-links.js)
    content/communicator/pref/pref-links.xul                         (pref/pref-links.xul)
    content/communicator/pref/pref-locationbar.js                    (pref/pref-locationbar.js)
    content/communicator/pref/pref-locationbar.xul                   (pref/pref-locationbar.xul)
+   content/communicator/pref/pref-media.xul                         (pref/pref-media.xul)
    content/communicator/pref/pref-mousewheel.js                     (pref/pref-mousewheel.js)
    content/communicator/pref/pref-mousewheel.xul                    (pref/pref-mousewheel.xul)
    content/communicator/pref/pref-navigator.js                      (pref/pref-navigator.js)
    content/communicator/pref/pref-navigator.xul                     (pref/pref-navigator.xul)
    content/communicator/pref/pref-offlineapps.js                    (pref/pref-offlineapps.js)
    content/communicator/pref/pref-offlineapps.xul                   (pref/pref-offlineapps.xul)
    content/communicator/pref/pref-passwords.xul                     (pref/pref-passwords.xul)
    content/communicator/pref/pref-popups.js                         (pref/pref-popups.js)
new file mode 100644
--- /dev/null
+++ b/suite/common/pref/pref-media.xul
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!DOCTYPE overlay [
+<!ENTITY % platformCommunicationDTD SYSTEM "chrome://communicator-platform/locale/pref/platformPrefOverlay.dtd">
+%platformCommunicationDTD;
+<!ENTITY % mediaDTD SYSTEM "chrome://communicator/locale/pref/pref-media.dtd">
+%mediaDTD;
+]>
+
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+  <prefpane id="media_pane"
+            label="&pref.media.title;">
+
+    <preferences id="media_preferences">
+      <preference id="media.autoplay.enabled"
+                  name="media.autoplay.enabled"
+                  type="bool"/>
+    </preferences>
+
+      <groupbox id="mediaHTML5Preferences" align="start">
+        <caption label="&mediaHTML5Preferences.label;"/>
+        <checkbox id="autoplay"
+                  label="&allowMediaAutoplay.label;"
+                  accesskey="&allowMediaAutoplay.accesskey;"
+                  preference="media.autoplay.enabled"/>
+      </groupbox>
+
+  </prefpane>
+</overlay>
--- a/suite/common/pref/preferences.xul
+++ b/suite/common/pref/preferences.xul
@@ -71,16 +71,21 @@
                     prefpane="fonts_pane"
                     helpTopic="appearance_pref_fonts"
                     url="chrome://communicator/content/pref/pref-fonts.xul"/>
           <treeitem id="colorsItem"
                     label="&colors.label;"
                     prefpane="colors_pane"
                     helpTopic="appearance_pref_colors"
                     url="chrome://communicator/content/pref/pref-colors.xul"/>
+          <treeitem id="mediaItem"
+                    label="&media.label;"
+                    prefpane="media_pane"
+                    helpTopic="appearance_pref_media"
+                    url="chrome://communicator/content/pref/pref-media.xul"/>
           <treeitem id="spellingItem"
                     label="&spellingPane.label;"
                     prefpane="spelling_pane"
                     helpTopic="appearance_pref_spelling"
                     url="chrome://communicator/content/pref/pref-spelling.xul"/>
         </treechildren>
       </treeitem>
 
--- a/suite/locales/en-US/chrome/common/help/cs_nav_prefs_appearance.xhtml
+++ b/suite/locales/en-US/chrome/common/help/cs_nav_prefs_appearance.xhtml
@@ -31,16 +31,17 @@
 </ol>
 
 <div class="contentsBox">In this section: 
   <ul>
     <li><a href="#appearance">Appearance</a></li>
     <li><a href="#content">Content</a></li>
     <li><a href="#fonts">Fonts</a></li>
     <li><a href="#colors">Colors</a></li>
+    <li><a href="#media">Media</a></li>
     <li><a href="#spelling">Spelling</a></li>
   </ul>
 </div>
 
 <h2 id="appearance">Appearance Preferences - Appearance</h2>
 
 <p>This section describes how to use the Appearance preferences panels. If
   you&apos;re not already viewing one of these panels, follow these steps:</p>
@@ -280,16 +281,33 @@
         colors and backgrounds, <em>unless</em> an accessibility desktop theme
         is used, in which case your own colors will be used.</li>
     </ul>
   </li>
 </ul>
 
 <p>[<a href="#appearance_preferences">Return to beginning of section</a>]</p>
 
+<h2 id="media">Appearance Preferences - Media</h2>
+
+<p>This section describes how to use the Media preferences panel. If
+  you&apos;re not already viewing it, follow these steps:</p>
+
+<ol>
+  <li>Open the <span class="mac">&brandShortName;</span>
+    <span class="noMac">Edit</span> menu and choose Preferences.</li>
+  <li>Under the Appearance category, click Media. (If no subcategories are
+    visible, double-click Appearance to expand the list.)</li>
+</ol>
+
+<p>The Media preferences panel allows you to toggle the autoplay option
+for HTML5 audio and video content.</p>
+
+<p>[<a href="#appearance_preferences">Return to beginning of section</a>]</p>
+
 <h2 id="spelling">Appearance Preferences - Spelling</h2>
 
 <p>This section describes how to use the Spelling preferences panel. If
   you&apos;re not already viewing it, follow these steps:</p>
 
 <ol>
   <li>Open the <span class="mac">&brandShortName;</span>
     <span class="noMac">Edit</span> menu and choose Preferences.</li>
--- a/suite/locales/en-US/chrome/common/help/suite-toc.rdf
+++ b/suite/locales/en-US/chrome/common/help/suite-toc.rdf
@@ -790,16 +790,17 @@
   </rdf:Description>
 
 <rdf:Description about="#appearance_pref">
     <nc:subheadings>
       <rdf:Seq>
         <rdf:li> <rdf:Description ID="appearance_pref_content" nc:name="Content" nc:link="cs_nav_prefs_appearance.xhtml#content"/> </rdf:li>
         <rdf:li> <rdf:Description ID="appearance_pref_fonts" nc:name="Fonts" nc:link="cs_nav_prefs_appearance.xhtml#fonts"/> </rdf:li>
         <rdf:li> <rdf:Description ID="appearance_pref_colors" nc:name="Colors" nc:link="cs_nav_prefs_appearance.xhtml#colors"/> </rdf:li>
+        <rdf:li> <rdf:Description ID="appearance_pref_media" nc:name="Media" nc:link="cs_nav_prefs_appearance.xhtml#media"/> </rdf:li>
         <rdf:li> <rdf:Description ID="appearance_pref_spelling" nc:name="Spelling" nc:link="cs_nav_prefs_appearance.xhtml#spelling"/> </rdf:li>
       </rdf:Seq>
     </nc:subheadings>
   </rdf:Description>
 
 <rdf:Description about="#navigator_pref_navigator">
     <nc:subheadings>
       <rdf:Seq>
new file mode 100644
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/pref/pref-media.dtd
@@ -0,0 +1,11 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!-- extracted from content/pref-media.xul -->
+
+<!-- LOCALIZATION NOTE : FILE Media management prefs -->
+<!ENTITY pref.media.title                  "Media">
+<!ENTITY mediaHTML5Preferences.label       "Audio/Video">
+<!ENTITY allowMediaAutoplay.label          "Enable Autoplay of HTML5 media content">
+<!ENTITY allowMediaAutoplay.accesskey      "A">
--- a/suite/locales/en-US/chrome/common/pref/preferences.dtd
+++ b/suite/locales/en-US/chrome/common/pref/preferences.dtd
@@ -5,16 +5,17 @@
 <!--LOCALIZATION NOTE (.label): Preferences categories that appear on the left of the preferences dialog -->
 <!ENTITY prefWindow.title "Preferences">
 <!ENTITY categoryHeader "Category">
 
 <!ENTITY appear.label "Appearance">
 <!ENTITY content.label "Content">
 <!ENTITY fonts.label "Fonts">
 <!ENTITY colors.label "Colors">
+<!ENTITY media.label "Media">
 <!ENTITY spellingPane.label "Spelling">
 
 <!ENTITY navigator.label "Browser">
 <!ENTITY history.label "History">
 <!ENTITY languages.label "Languages">
 <!ENTITY applications.label "Helper Applications">
 <!ENTITY locationBar.label "Location Bar">
 <!ENTITY search.label "Internet Search">
--- a/suite/locales/jar.mn
+++ b/suite/locales/jar.mn
@@ -180,16 +180,17 @@
   locale/@AB_CD@/communicator/pref/pref-history.dtd                         (%chrome/common/pref/pref-history.dtd)
   locale/@AB_CD@/communicator/pref/pref-http.dtd                            (%chrome/common/pref/pref-http.dtd)
   locale/@AB_CD@/communicator/pref/pref-images.dtd                          (%chrome/common/pref/pref-images.dtd)
   locale/@AB_CD@/communicator/pref/pref-keynav.dtd                          (%chrome/common/pref/pref-keynav.dtd)
   locale/@AB_CD@/communicator/pref/pref-languages.dtd                       (%chrome/common/pref/pref-languages.dtd)
   locale/@AB_CD@/communicator/pref/pref-languages.properties                (%chrome/common/pref/pref-languages.properties)
   locale/@AB_CD@/communicator/pref/pref-links.dtd                           (%chrome/common/pref/pref-links.dtd)
   locale/@AB_CD@/communicator/pref/pref-locationbar.dtd                     (%chrome/common/pref/pref-locationbar.dtd)
+  locale/@AB_CD@/communicator/pref/pref-media.dtd                           (%chrome/common/pref/pref-media.dtd)
   locale/@AB_CD@/communicator/pref/pref-mousewheel.dtd                      (%chrome/common/pref/pref-mousewheel.dtd)
   locale/@AB_CD@/communicator/pref/pref-navigator.dtd                       (%chrome/common/pref/pref-navigator.dtd)
   locale/@AB_CD@/communicator/pref/pref-offlineapps.dtd                     (%chrome/common/pref/pref-offlineapps.dtd)
   locale/@AB_CD@/communicator/pref/pref-passwords.dtd                       (%chrome/common/pref/pref-passwords.dtd)
   locale/@AB_CD@/communicator/pref/pref-popups.dtd                          (%chrome/common/pref/pref-popups.dtd)
   locale/@AB_CD@/communicator/pref/pref-privatedata.dtd                     (%chrome/common/pref/pref-privatedata.dtd)
   locale/@AB_CD@/communicator/pref/pref-proxies.dtd                         (%chrome/common/pref/pref-proxies.dtd)
   locale/@AB_CD@/communicator/pref/pref-proxies-advanced.dtd                (%chrome/common/pref/pref-proxies-advanced.dtd)