From e26d6a3c4be76e8111f8fa19c60b3e0880ad69be Mon Sep 17 00:00:00 2001
From: Michael Kaply <345868+mkaply@users.noreply.github.com>
Date: Wed, 2 Dec 2020 11:20:26 -0600
Subject: [PATCH] Correct PictureInPicture policies. Fixes #713
---
 README.md                     | 21 ++++++++++++++++-----
 mac/org.mozilla.firefox.plist |  7 ++++++-
 windows/de-DE/firefox.adml    |  9 +++++++--
 windows/en-US/firefox.adml    |  9 +++++++--
 windows/es-ES/firefox.adml    |  9 +++++++--
 windows/firefox.admx          | 17 +++++++++++++++--
 windows/fr-FR/firefox.adml    |  9 +++++++--
 windows/it-IT/firefox.adml    | 10 ++++++++--
 windows/zh-TW/firefox.adml    |  9 +++++++--
 9 files changed, 80 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index 87c4516..0e1cfb0 100644
--- a/README.md
+++ b/README.md
@@ -3803,7 +3803,7 @@ Value (string):
 ```
 ### PictureInPicture
 
-Enable or disable Picture-in-Picture.
+Enable or disable Picture-in-Picture as well as lock it.
 
 **Compatibility:** Firefox 78, Firefox ESR 78\
 **CCK2 Equivalent:** N/A\
@@ -3811,12 +3811,15 @@ Enable or disable Picture-in-Picture.
 
 #### Windows (GPO)
 ```
-Software\Policies\Mozilla\Firefox\PictureInPicture = 0x1 | 0x0
+Software\Policies\Mozilla\Firefox\PictureInPicture\Enabled = 0x1 | 0x0
+Software\Policies\Mozilla\Firefox\PictureInPicture\Locked = 0x1 | 0x0
+
 ```
 #### Windows (Intune)
 OMA-URI:
 ```
-./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/PictureInPicture
+./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~PictureInPicture/PictureInPicture_Enabled
+./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~PictureInPicture/PictureInPicture_Locked
 ```
 Value (string):
 ```
@@ -3826,14 +3829,22 @@ Value (string):
 ```
 
   PictureInPicture
-   | 
+  
+    Enabled
+     | 
+    Locked
+     | 
+  
 
 ```
 #### policies.json
 ```
 {
   "policies": {
-    "PictureInPicture": true | false
+    "PictureInPicture": {
+      "Enabled": true | false,
+      "Locked": true, false
+    }
   }
 }
 ```
diff --git a/mac/org.mozilla.firefox.plist b/mac/org.mozilla.firefox.plist
index 3070383..d14eb7c 100644
--- a/mac/org.mozilla.firefox.plist
+++ b/mac/org.mozilla.firefox.plist
@@ -497,7 +497,12 @@
 		
 	
 	PictureInPicture
-	
+	
+		Enabled
+		
+		Locked
+		
+	
 	PopupBlocking
 	
 		Allow
diff --git a/windows/de-DE/firefox.adml b/windows/de-DE/firefox.adml
index 3ebb0d9..81b5b4d 100644
--- a/windows/de-DE/firefox.adml
+++ b/windows/de-DE/firefox.adml
@@ -60,6 +60,7 @@
       Disabled Ciphers
       DRM-Medien Erweiterungen
       PDFjs
+      Bild in Bild
       Erlaubte Seiten
       Erlaubte Seiten (Session Only)
       Gesperrte Seiten
@@ -793,10 +794,14 @@ Wenn diese Richtlinieneinstellung aktiviert oder nicht konfiguriert ist, wird de
       Wenn diese Richtlinieneinstellung aktiviert ist, werden Berechtigungen des PDF-Dokuments (wie z.B. Markieren und Kopieren von Text verhindern) angewendet.
 
 Wenn diese Richtlinieneinstellung deaktiviert oder nicht konfiguriert ist, werden Berechtigungen im PDF-Dokument ignoriert.
-      Bild in Bild
-      Wenn diese Richtlinieneinstellung deaktiviert ist, ist die Bild-in-Bild Funktion deaktiviert.
+      Aktiviert
+      Wenn diese Richtlinieneinstellung deaktiviert ist, ist die Bild-in-Bild Funktion deaktiviert.
 
 Wenn diese Richtlinieneinstellung aktiviert oder nicht konfiguriert ist, ist die Bild-in-Bild Funktion verfügbar.
+      Gesperrt
+      Wenn diese Richtlinieneinstellung aktiviert ist, können die Bild-in-Bild-Einstellungen vom Benutzer nicht geändert werden.
+
+Wenn diese Richtlinieneinstellung deaktiviert oder nicht konfiguriert ist, können die Bild-in-Bild-Einstellungen vom Benutzer geändert werden.
       Masterpasswort
       Wenn diese Richtlinieneinstellung aktiviert ist, ist das Setzen eines Masterpasswortes erforderlich.
 
diff --git a/windows/en-US/firefox.adml b/windows/en-US/firefox.adml
index 6e0dc3e..313931f 100644
--- a/windows/en-US/firefox.adml
+++ b/windows/en-US/firefox.adml
@@ -60,6 +60,7 @@
       Disabled Ciphers
       Encrypted Media Extensions
       PDFjs
+      Picture-in-Picture
       Allowed Sites
       Allowed Sites (Session Only)
       Blocked Sites
@@ -795,10 +796,14 @@ If this policy is enabled or not configured, the built-in PDF viewer is used.If this policy is enabled, the built-in PDF viewer will honor document permissions like preventing the copying of text.
 
 If this policy is not disabled or not configured, document permissions are ignored.
-      Picture-in-Picture
-      If this policy is disabled, the Picture-in-Picture toggle does not appear on videos.
+      Enabled
+      If this policy is disabled, the Picture-in-Picture toggle does not appear on videos.
 
 If this policy is enabled or not configured, the Picture-in-Picture toggle is available on videos.
+      Locked
+      If this policy is enabled, Picture-in-Picture settings cannot be changed by the user.
+
+If this policy is disabled or not configured,Picture-in-Picture settings can be changed by the user.
       Primary (Master) Password
       If this policy is enabled, a primary password is required.
 
diff --git a/windows/es-ES/firefox.adml b/windows/es-ES/firefox.adml
index c06adb4..1a283ca 100644
--- a/windows/es-ES/firefox.adml
+++ b/windows/es-ES/firefox.adml
@@ -60,6 +60,7 @@
       Cifrados deshabilitados
       Extensiones de medios cifrados
       PDFjs
+      Picture-in-Picture
       Sitios permitidos
       Sitios permitidos (Session Only)
       Sitios bloqueados
@@ -795,10 +796,14 @@ Si esta polÃtica está habilitada o no configurada, se utilizará el visor de P
       Si esta polÃtica está habilitada, el visor de PDF incorporado respetará los permisos del documento, como evitar la copia de texto.
 
 Si esta polÃtica no está deshabilitada o no está configurada, se ignorarán los permisos del documento.
-      Picture-in-Picture
-      If this policy is disabled, the Picture-in-Picture toggle does not appear on videos.
+      Enabled
+      If this policy is disabled, the Picture-in-Picture toggle does not appear on videos.
 
 If this policy is enabled or not configured, the Picture-in-Picture toggle is available on videos.
+      Locked
+      If this policy is enabled, Picture-in-Picture settings cannot be changed by the user.
+
+If this policy is disabled or not configured,Picture-in-Picture settings can be changed by the user.
       Primary (Master) Password
       If this policy is enabled, a primary password is required.
 
diff --git a/windows/firefox.admx b/windows/firefox.admx
index bcca2d1..5cf986d 100644
--- a/windows/firefox.admx
+++ b/windows/firefox.admx
@@ -120,6 +120,9 @@
     
       
     
+    
+      
+    
   
   
     
@@ -3666,8 +3669,18 @@
         
       
     
-    
-      
+    
+      
+      
+      
+        
+      
+      
+        
+      
+    
+    
+      
       
       
         
diff --git a/windows/fr-FR/firefox.adml b/windows/fr-FR/firefox.adml
index 3a3599d..27f9678 100644
--- a/windows/fr-FR/firefox.adml
+++ b/windows/fr-FR/firefox.adml
@@ -60,6 +60,7 @@
       Disabled Ciphers
       Encrypted Media Extensions
       PDFjs
+      Picture-in-Picture
       Sites autorisés
       Sites autorisés (Session Only)
       Sites bloqués
@@ -794,10 +795,14 @@ If this policy is enabled or not configured, the built-in PDF viewer is used.If this policy is enabled, the built-in PDF viewer will honor document permissions like preventing the copying of text.
 
 If this policy is not disabled or not configured, document permissions are ignored.
-      Picture-in-Picture
-      If this policy is disabled, the Picture-in-Picture toggle does not appear on videos.
+      Enabled
+      If this policy is disabled, the Picture-in-Picture toggle does not appear on videos.
 
 If this policy is enabled or not configured, the Picture-in-Picture toggle is available on videos.
+      Locked
+      If this policy is enabled, Picture-in-Picture settings cannot be changed by the user.
+
+If this policy is disabled or not configured,Picture-in-Picture settings can be changed by the user.
       Primary (Master) Password
       If this policy is enabled, a primary password is required.
 
diff --git a/windows/it-IT/firefox.adml b/windows/it-IT/firefox.adml
index 64fde92..50e946f 100644
--- a/windows/it-IT/firefox.adml
+++ b/windows/it-IT/firefox.adml
@@ -60,6 +60,7 @@
       Cifrari disabilitati
       Encrypted Media Extensions
       PDFjs
+      Picture-in-Picture
       Siti consentiti
       Siti consentiti (solo sessione)
       Siti bloccati
@@ -795,10 +796,15 @@ Se questo criterio è abilitato o non configurato, viene utilizzato il visualizz
       Se questo criterio è abilitato, il visualizzatore PDF integrato rispetterà i permessi del documento (ad esempio, l'impedire la copia del testo).
 
 Se questo criterio è disabilitato o non configurato, i permessi del documento sono ignorati.
-      Picture-in-Picture
-      Se questo criterio è disabilitato, l'interruttore Picture-in-Picture non appare nei video.
+      Abilitato
+      Se questo criterio è disabilitato, l'interruttore Picture-in-Picture non appare nei video.
 
 Se questo criterio è abilitato o non configurato, l'interruttore Picture-in-Picture è disponibile per i video.
+      Bloccato
+      Se questo criterio è abilitato, le impostazioni Picture-in-Picture non possono essere modificate dall'utente.
+
+Se questo criterio è disabilitato o non configurato, le impostazioni Picture-in-Picture possono essere modificate dall'utente.
+
       Password principale
       Se questo criterio è abilitato, è richiesto impostare una password principale.
 
diff --git a/windows/zh-TW/firefox.adml b/windows/zh-TW/firefox.adml
index bada551..22d5a7a 100644
--- a/windows/zh-TW/firefox.adml
+++ b/windows/zh-TW/firefox.adml
@@ -60,6 +60,7 @@
       åç¨å å¯æ¼ç®æ³
       å å¯åªé«æ´å
åè½
       PDFjs
+      忝ç«é¢
       å
許çç¶²ç«
       å
許çç¶²ç«ï¼å
ç¶æ¬¡çè¦½éæ®µï¼
       å°éçç¶²ç«
@@ -793,10 +794,14 @@ Starting with Firefox 83, Firefox ESR 78.5, you can also specify multiple URLS s
       è¥åç¨æ¤ååï¼å°æéµå¾ªæä»¶æ¬éè¨å®ï¼ä¾å¦é²æ¢æåè¤è£½ï¼ã
 
 è¥åç¨æä¸è¨å®æ¤ååï¼å°±æå¿½ç¥æä»¶æ¬éã
-      忝ç«é¢
-      è¥åç¨æ¤ååï¼å°ä¸æå¨å½±çä¸é¡¯ç¤ºåæé²å
¥åæ¯ç«é¢çæéã
+      åç¨
+      è¥åç¨æ¤ååï¼å°ä¸æå¨å½±çä¸é¡¯ç¤ºåæé²å
¥åæ¯ç«é¢çæéã
 
 è¥åç¨æä¸è¨å®æ¤ååï¼åæå¨å½±çä¸é¡¯ç¤ºåæ¯ç«é¢æéã
+      éå®
+      è¥åç¨æ¤ååï¼ä½¿ç¨è
å°ç¡æ³æ´æ¹ 忝ç«é¢ è¨å®ã
+
+è¥åç¨æä¸è¨å®æ¤ååï¼åå
許使ç¨è
æ´æ¹ 忝ç«é¢ è¨å®ã
       主æ§å¯ç¢¼
       è¥åç¨æ¤ååï¼å°å¿
é è¼¸å
¥ä¸»æ§å¯ç¢¼ã
 
-- 
2.43.0