FrostCo / AdvancedProfanityFilter

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

Apple TV Captions hidden when extension is active #547

Closed bdc0der closed 1 month ago

bdc0der commented 3 months ago

:bug: Description

I have noticed (for about the past few days) that the extension messes up the Apple TV website. Specifically, if the extension is active, the captions won't appear.

:twisted_rightwards_arrows: Steps To Reproduce

  1. Go to tv.apple.com
  2. Click on any video (I chose Palm Royale as an example)
  3. Make sure captions are enabled and the extension is active
  4. See the captions hidden

:heavy_check_mark: Expected behavior

I expected the captions to be present, but they were hidden, which made it impossible to filter the audio.

:camera: Screenshots

Screenshot 2024-03-23 at 6 18 14 PM

Screenshot 2024-03-23 at 6 21 08 PM#### :computer: Details

:pencil: Additional context

I've double-checked to make sure I have the captions enabled, and I've tried using a brand-new extension profile on a brand-new browser profile. (I now use Brave for testing stuff, and Chrome for personal use)

richardfrost commented 3 months ago

Thanks for reporting the issue. I think the problem is actually two-fold. For Apple TV, APF has actually been hiding the captions for quite a while now, but it is supposed to show its own version of them on the page. Due to other behaviors that Apple TV had, it was the best option I had to make it work with the page. It seems that they have changed their page layout though, and it has broken it in such a way as to hide all the captions, but not detect that there are actually any, so it isn't showing any. Sorry for the long explanation.

I will try to build out an updated config in the next day or two, and I'll post it here so you can try it out.

bdc0der commented 3 months ago

No problem. Sounds good, I eagerly await your results.

richardfrost commented 3 months ago

I can't test this right now, but if you have some time @bdc0der feel free to give it a try:

{
  "tv.apple.com": [
    {
      "apfCaptions": true,
      "apfCaptionsSelector": "div.video-container",
      "captionControlStyle": true,
      "displaySelector": "div.video-player div.video-container > div > div",
      "mode": "watcher",
      "subtitleSelector": "div.video-player div.video-container > div > div > div > div",
      "videoSelector": "div.video-player div.video-container video"
    }
  ]
}

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.

bdc0der commented 3 months ago

This configuration works perfectly on both the devices and browsers I used. Thanks for the quick response!

richardfrost commented 3 months ago

You're welcome! Thanks for confirming that it's working. I'll get this added into the next version of the extension. Once you get the update, I'd recommend removing the custom config provided here, just in case it changes again in the future. Until then though, feel free to use this without any problems.

bdc0der commented 3 months ago

Sounds good. I'll keep this open for a few more days in case of any problems. Otherwise, thanks for the help!

richardfrost commented 3 months ago

I have included this latest config in Version 3.4.1. Feel free to respond here if you have any more feedback (good or bod). I'll leave this open for a few more days before closing it. Thanks @bdc0der for your help in reporting the issue and testing the fix.