Bug 1543812 - Add ability to block all autoplay. r=johannh,alwu,flod,fluent-reviewers draft
authorDale Harvey <dale@arandomurl.com>
Thu, 06 Jun 2019 09:06:09 +0000
changeset 11610 67e0c824122c7c4857cc2eb317b86638fe5beef1
parent 11609 8d6e71b1b2cbdf2e0d0df09c7ec42ba47f2a28e7
child 11611 b35afd9fe3eaa3ffab63dab49d7c2d95571ed58f
push id252
push userflodolo@mozilla.com
push dateFri, 07 Jun 2019 06:15:07 +0000
reviewersjohannh, alwu, flod, fluent-reviewers
bugs1543812
Bug 1543812 - Add ability to block all autoplay. r=johannh,alwu,flod,fluent-reviewers Differential Revision: https://phabricator.services.mozilla.com/D30135 X-Channel-Repo: mozilla-central X-Channel-Converted-Revision: 75a6f48ca07813830b88470606a2145b2f7610e7 X-Channel-Repo: releases/mozilla-beta X-Channel-Revision: 794943628c3b0f522df456695520b9083038062d X-Channel-Repo: releases/mozilla-release X-Channel-Revision: df853c362664989e025d1206b59c37c435186a91
browser/browser/preferences/permissions.ftl
browser/browser/preferences/preferences.ftl
browser/chrome/browser/sitePermissions.properties
--- a/browser/browser/preferences/permissions.ftl
+++ b/browser/browser/preferences/permissions.ftl
@@ -41,19 +41,28 @@ permissions-remove-all =
 permissions-button-cancel =
     .label = Cancel
     .accesskey = C
 
 permissions-button-ok =
     .label = Save Changes
     .accesskey = S
 
+permissions-autoplay-menu = Default for all websites:
+
 permissions-searchbox =
     .placeholder = Search Website
 
+permissions-capabilities-autoplay-allow =
+    .label = Allow Audio and Video
+permissions-capabilities-autoplay-block =
+    .label = Block Audio
+permissions-capabilities-autoplay-blockall =
+    .label = Block Audio and Video
+
 permissions-capabilities-allow =
     .label = Allow
 permissions-capabilities-block =
     .label = Block
 permissions-capabilities-prompt =
     .label = Always Ask
 
 permissions-capabilities-listitem-allow =
@@ -105,16 +114,23 @@ permissions-exceptions-addons-desc = You
 
 ## Exceptions - Autoplay Media
 
 permissions-exceptions-autoplay-media-window2 =
     .title = Exceptions - Autoplay
     .style = { permissions-window.style }
 permissions-exceptions-autoplay-media-desc2 = You can specify which websites are always or never allowed to autoplay media with sound. Type the address of the site you want to manage and then click Block or Allow.
 
+## Site Permissions - Autoplay
+
+permissions-site-autoplay-window =
+    .title = Settings - Autoplay
+    .style = { permissions-window.style }
+permissions-site-autoplay-desc = You can manage the sites that do not follow your default autoplay settings here.
+
 ## Site Permissions - Notifications
 
 permissions-site-notification-window =
     .title = Settings - Notification Permissions
     .style = { permissions-window.style }
 permissions-site-notification-desc = The following websites have requested to send you notifications. You can specify which websites are allowed to send you notifications. You can also block new requests asking to allow notifications.
 permissions-site-notification-disable-label =
     .label = Block new requests asking to allow notifications
--- a/browser/browser/preferences/preferences.ftl
+++ b/browser/browser/preferences/preferences.ftl
@@ -900,17 +900,17 @@ content-blocking-option-private =
   .label = Only in Private Windows
   .accesskey = p
 content-blocking-tracking-protection-change-block-list = Change block list
 
 content-blocking-cookies-label =
   .label = Cookies
   .accesskey = C
 
-content-blocking-expand-section = 
+content-blocking-expand-section =
   .tooltiptext = More information
 
 # Cryptomining refers to using scripts on websites that can use a computer’s resources to mine cryptocurrency without a user’s knowledge.
 content-blocking-cryptominers-label =
   .label = Cryptominers
   .accesskey = y
 
 # Browser fingerprinting is a method of tracking users by the configuration and settings information (their "digital fingerprint")
@@ -957,16 +957,22 @@ permissions-notification-pause =
 permissions-block-autoplay-media2 =
     .label = Block websites from automatically playing sound
     .accesskey = B
 
 permissions-block-autoplay-media-exceptions =
     .label = Exceptions…
     .accesskey = E
 
+permissions-autoplay = Autoplay
+
+permissions-autoplay-settings =
+    .label = Settings…
+    .accesskey = t
+
 permissions-block-popups =
     .label = Block pop-up windows
     .accesskey = B
 
 permissions-block-popups-exceptions =
     .label = Exceptions…
     .accesskey = E
 
--- a/browser/chrome/browser/sitePermissions.properties
+++ b/browser/chrome/browser/sitePermissions.properties
@@ -23,16 +23,20 @@ state.current.hide = Hide Prompt
 #                    state.multichoice.allowForSession,
 #                    state.multichoice.block):
 # Used to label permission state checkboxes in the page info dialog.
 state.multichoice.alwaysAsk = Always Ask
 state.multichoice.allow = Allow
 state.multichoice.allowForSession = Allow for Session
 state.multichoice.block = Block
 
+state.multichoice.autoplayblock = Block Audio
+state.multichoice.autoplayblockall = Block Audio and Video
+state.multichoice.autoplayallow = Allow Audio and Video
+
 permission.autoplay-media2.label = Autoplay sound
 permission.cookie.label = Set Cookies
 permission.desktop-notification3.label = Send Notifications
 permission.image.label = Load Images
 permission.camera.label = Use the Camera
 permission.microphone.label = Use the Microphone
 permission.screen.label = Share the Screen
 permission.install.label = Install Add-ons