FrostCo / AdvancedProfanityFilter

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

Hulu audio muting not working #544

Closed bdc0der closed 4 months ago

bdc0der commented 5 months ago

:bug: Description

The extension recognizes text from captions on Hulu, but it doesn't mute the audio when the text gets censored.

:twisted_rightwards_arrows: Steps To Reproduce

  1. Enable audio muting on APF
  2. Go to Hulu
  3. Example video: Life in Pieces S2 E22, timestamp 9:00 (12:13 minutes remaining)

:heavy_check_mark: Expected behavior

I expected the extension to censor the audio along with the text, but only the text censored

:camera: Screenshots

Screenshot 2024-02-06 at 7 43 31 PM

:computer: Details

:pencil: Additional context

Another user also reported this issue, so I tried to test the audio and edit this comment to make it easier for you.

The problem originally occurred on a custom APF config on Chrome, and I tried installing APF on a brand-new Firefox profile. I have also tried all audio muting methods but the problem persisted. With the browser tab method selected, it appears I can mute the browser tab manually, which suggests the extension failed to do so. Hopefully this makes sense.

(ignore the thing with only the UI being visible in the screenshot, it appears that Hulu not allowing me to capture video content)

WolfD1g1tal commented 5 months ago

Mine is not even activating on hulu. it doesn't even cloak the subtitles. image Up to date chrome with windows 11. it just stoped working within the last week. dont meber what day. image

WolfD1g1tal commented 5 months ago

simply going to the page recreates it.

richardfrost commented 5 months ago

It looks like at least in the case of the episode of "Life in Pieces" that they are using a new format for their captions.

I don't have much time today, but here is a custom config that we could try on and I'd love to get some feedback from it:

{
  "www.hulu.com": [
    {
      "displaySelector": "div.ClosedCaption",
      "iframe": false,
      "mode": "watcher",
      "note": "Hulu update 24-02",
      "parentSelector": "div.ClosedCaption div.CaptionBox"
    },
    {
      "className": "caption-text-box",
      "displaySelector": "div.caption-text-box",
      "mode": "element",
      "subtitleSelector": "p",
      "tagName": "DIV"
    },
    {
      "displaySelector": "div.CaptionBox",
      "mode": "elementChild",
      "parentSelector": "div.CaptionBox",
      "tagName": "P"
    }
  ]
}

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.

Unfortunately with the way their subtitles appear to be working, at least on that episode I tried it looks like we'll have to fallback to the watcher method for now. There might be some brief flashes or flickers of captions when hiding them, and its also possible for unfiltered captions to briefly show up as well. I'll look into it more when I have time, but if either @WolfD1g1tal or @bdc0der have time to test this out and share how it goes I'd appreciate it.

bdc0der commented 5 months ago

I did rough tests on both browsers and devices, and the custom config appeared to fix the problem. I'll keep the issue open for a few more days (in case I encounter more problems, or you find a more certain fix for it), but for now, it works great.

Many thanks for your continued support!

WolfD1g1tal commented 5 months ago

windows 11 chrome up to date seems to be working now. Looks like that was the fix. my number count is registering like about 3 filter actions for each 1. but it has been doing that on and off on several sites. Thanks heaps for the fix.

TruSteel commented 4 months ago

Windows 11, Chrome and APF, all up to date. Tried different settings and nothing worked for me. Tubi, Max, Peacock and more work great but Hulu doesn't. Hope to see a fix soon. Thank you

TruSteel commented 4 months ago

Hi thank you, new config I got to work. ty for your help

bdc0der commented 4 months ago

Well after a few days of using Hulu, I can't say I've found any issues with the config, so I'll be closing the issue. Thanks again for your continued and quick support!

richardfrost commented 4 months ago

Thank you for reporting back @bdc0der, @WolfD1g1tal, & @TruSteel. I'll get this added into the next version.

For best results, make sure to remove any custom config used for testing like this once it has been included in the official update.

richardfrost commented 4 months ago

This was added in Version 3.3.3.

If you used the "Custom config" in this issue, its recommend to remove the custom config once it has been included in the official update.

bdc0der commented 4 months ago

Duly noted, thank you