FrostCo / AdvancedProfanityFilter

A browser extension to filter profanity from webpages
GNU General Public License v3.0
162 stars 26 forks source link

amazon prime video not muting audio #559

Closed jorymadi closed 1 month ago

jorymadi commented 1 month ago

As the title suggests, when I try using the filter with Amazon Prime on Chrome and Firefox, it won't mute the audio for any profanity.

I followed the instructions as closely as I could, and still nothing.

I'm not sure if I'm missing something, or if Prime Video changed something, since it's worked for me before

Thanks for any help!

andrewrmcneill commented 1 month ago

I'm also experiencing this issue with the Amazon Prime UK site. The filter captures the subtitle text but does not mute the audio.

If it's any help, I've identified a code snippet of subtitles but haven't had any success at turning it into a custom configuration:

<div class="f1iwgj00" dir="auto"><div style="text-align: center; justify-content: flex-end; width: 100%; left: 0%; bottom: 30px; display: flex; position: absolute; flex-direction: column;"><p style="width: 100%; margin: 0px; font-style: normal; font-weight: normal; font-size: 100%;"><span class="fbhsa9" style="background-color: rgba(0, 0, 0, 0);"><span class="atvwebplayersdk-captions-text f7j034j" style="background-color: rgba(0, 0, 0, 0.5); color: rgb(255, 255, 255); font-size: 32px;">♪ I swear to God<br>I've seen it all ♪</span></span></p></div></div>

Thanks for any help!

acougle commented 1 month ago

Amazon Prime has stopped being filtered (Netflix still is). Won't mute or substitute captions.

richardfrost commented 1 month ago

Thanks for all the reports. I'm going to look into it, but most likely Amazon has made a change to their site that is interfering with APF's ability to correctly identify captions/subtitles.

richardfrost commented 1 month ago

Sorry for the wait everyone (@jorymadi, @andrewrmcneill, @acougle), it took a bit more work than I expected to work through it. If anyone is available for trying something, please try the following config:

{
  "www.amazon.co.uk": [
    {
      "displaySelector": "div.atvwebplayersdk-captions-overlay span.atvwebplayersdk-captions-text",
      "iframe": false,
      "mode": "watcher",
      "parentSelector": "span.atvwebplayersdk-captions-text",
      "videoSelector": "div#dv-web-player video[src]"
    }
  ],
  "www.amazon.com": [
    {
      "displaySelector": "div.atvwebplayersdk-captions-overlay span.atvwebplayersdk-captions-text",
      "iframe": false,
      "mode": "watcher",
      "parentSelector": "span.atvwebplayersdk-captions-text",
      "videoSelector": "div#dv-web-player video[src]"
    }
  ],
  "www.primevideo.com": [
    {
      "displaySelector": "div.atvwebplayersdk-captions-overlay span.atvwebplayersdk-captions-text",
      "iframe": false,
      "mode": "watcher",
      "parentSelector": "span.atvwebplayersdk-captions-text",
      "videoSelector": "div#dv-web-player video[src]"
    }
  ]
}

To use this config, paste it into the Custom Sites area (Options page > Audio tab) and click the blue "SAVE" button underneath it. Then, make sure to refresh the tab for the video site (if you have it open still) and it will load this new configuration.

To make sure you get the latest updates in the future for Amazon, please make sure to remove this custom config when used for testing like this after it has been included in the official update.

If you can test it and let me know how it goes that would be great!

ITNerd79 commented 1 month ago

Just tested and it is working :)

andrewrmcneill commented 1 month ago

Amazing! Thank you, Richard - this works perfectly.

ricktheartist commented 1 month ago

Just tried it. It works again. Yay! Thank you Richard!

jorymadi commented 1 month ago

It's working for me too. Thanks!

richardfrost commented 1 month ago

Awesome! Thanks for all the reports everyone. Version 3.5.1 should now be available on most stores, so if you get the update you shouldn't need this custom config anymore. I recommend removing it so that you will get any future updates for Amazon as they get included in the extension. Thanks again for all the reports, it really helps!