FrostCo / AdvancedProfanityFilter

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

Audio mute not working with Orion browser on AppleTV #520

Open 1Mark opened 8 months ago

1Mark commented 8 months ago

:bug: Description

Muting profanity in audio on AppleTV doesn't work on Orion browser. Is this intended?

richardfrost commented 8 months ago

I haven't ever tried it before, so I don't know. Did it work previously @1Mark?

1Mark commented 8 months ago

It's the first time I'm trying it so I'm unsure. Was hoping you would tell me @richardfrost If you can try it please do, I was surprised it didn't work.

richardfrost commented 8 months ago

Yeah, I'll see if I can test it out sometime this weekend.

1Mark commented 8 months ago

Interesting it worked with YouTube. I tested with this https://m.youtube.com/watch?v=wGy5SGTuAGI&pp=ygUOc2lsaWNvbiB2YWxsZXk=

so I guess the issue is the video player from appletv on iPadOS

1Mark commented 8 months ago

I went back and retested with https://tv.apple.com/gb/show/slow-horses/umc.cmc.2szz3fdt71tl1ulnbp8utgq5o but it didn’t mute the audio

richardfrost commented 8 months ago

Unfortunately the iPad I have access is a bit outdated/old, but I did get more luck with this custom audio config. Can you give it a try?

{
  "tv.apple.com": {
    "mode": "cue",
    "videoCueLanguage": "en"
  }
}

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.

If it still doesn't work for you, I'll see if I can find someone around that has a newer iPad that I can do some more troubleshooting with.

1Mark commented 8 months ago

It worked! I was looking to raise an MR to add the fix to the codebase but from a quick glance couldn't figure out where the webAudioSites.ts disappeared off to. Anyway I can raise an MR to the README.md to mention support for iOS via Orion

richardfrost commented 8 months ago

Thanks for confirming its working @1Mark. Unfortunately its a bit more complicated than just a PR because as you discovered, the audio muting portion of the code has been moved into a closed-source repository as was announced in version 3.0.0.

In addition, the configuration for audio sites change based on the target device, so when I build the app/extension I build it for a specific target. Changing it to the config provided above for Chrome or Firefox would break muting on the desktop version of the browsers. This is because the media providers use different methods for delivering their videos/captions depending on the device that is playing it.

The officially supported method for using APF on iOS devices is to use the app in the App Store with Safari. If you use that, it will already have a compatible configuration for muting on Apple TV+, because the app it is built knowing it will be used on iOS.

Orion is a new discovery to me though, and its cool that it works for you. I'm totally fine mentioning it in the readme, but I'll still emphasize that it is not the recommended/supported path. I think I'll add a wiki page that can provide both instructions on using APF with Orion, and a list of audio configs, such as the one for Apple TV+. Ultimately it will be up to those using it to keep that config up-to-date if they run into issues though.

I'll add a backlog item to try to make this a bit easier, but for now hopefully that is workable.