I have this code to implement policies for bravebrowser. but the "AutoplayAllowed=false" doesn't work. all the other ones work

this applies to other chromium browsers

  programs = {
    chromium = {
      enable = true;
      extensions = [
        # "ddkjiahejlhfcafbddmgiahcphecmpfh" # ublock lite
        # "eimadpbcbfnmbkopoojfekhnkhdbieeh" # darkreader
        "lodbfhdipoipcjmlebjbgmmgekckhpfb" # harper
      ];
      extraOpts = {
        AutofillAddressEnabled = false;
        AutofillCreditCardEnabled = false;
        AutoplayAllowed = false;
        BackgroundModeEnabled = false;
        DefaultNotificationsSetting = 2;
        # defaultSearchProviderEnabled = true;
        # defaultSearchProviderSearchURL = "https://duckduckgo.com/ac/?q={searchTerms}&type=list";
        HighEfficiencyModeEnabled = true;
        MemorySaverModeSavings = 2;
        OsColorMode = "dark";
        PasswordManagerEnabled = false;
        PromptForDownloadLocation = true;
        RestoreOnStartup = 1;
        SearchSuggestEnabled = true;
        ShowFullUrlsInAddressBar = true;
        ShowHomeButton = false;
        SpellcheckEnabled = false;
        SyncDisabled = true;
      };
    };

first thing i’d check is brave://policy in the running browser. if AutoplayAllowed shows up there as applied then nix is writing the json fine and the problem is browser side, if it shows as unknown or does not appear at all then chromium is ignoring the key and no amount of nix config will fix it. that split tells you where to look.

my money is on browser side, autoplay handling got reworked upstream and brave layers its own shields on top of it, so the old policy key does not always do what the docs imply anymore. if policy is a dead end the reliable route is setting the site permission default for autoplay instead.

it’s there. i guess it’s just chromium’s inherent nature of faulty autoplay