AdvancedProfanityFilter
AdvancedProfanityFilter copied to clipboard
Delayed/Min unmuting for other sources than YouTube
Thank you for this plugin!
:loudspeaker: The Shortcoming
During playback from Amazon, the timing of the captions is not aligned to the muting during playback of the movie I am testing with; the mute occurs early and blocks everything before...but not the actual profanity. Understanding that the timing is not always perfect, I looked for a way to shift the mute or mute longer (like the YouTube min muting setting), since I would much rather miss more words than miss muting the profanity. I could not find a way to either set a min muting or delayedUnmute for Amazon (I looked through the code, but admit that I am not intimately familiar with the language or project source...)
:microscope: Describe the solution you'd like
Would like a way to delayUnmute (or min mute period) for other sources (Amazon in particular).
:triangular_ruler: Describe alternatives you've considered
The default for Amazon appears to be "watcher", and I see a setting "videoCueSync" for the Video TextTrack Cues mode; however, I don't understand the settings well enough to switch Amazon to that mode or to know if that would even work for my purpose (longer/shifted muting)
Thanks for raising the issue! I actually added this ability to the code in version 2.8.1. That being said, I haven't created any interface for it yet (no eta either, unfortunately).
Once you are on 2.8.1 or later, you should be able to add this in the custom site config (Option page > Audio tab > Custom Audio Sites box):
{
"www.amazon.com": {
"mode": "watcher",
"displayHide": "none",
"displaySelector": "div.webPlayerContainer div.f35bt6a",
"displayShow": "",
"iframe": false,
"parentSelector": "div.webPlayerContainer div p > span",
"subtitleSelector": "div.webPlayerContainer div span > span",
"unmuteDelay": 1000,
"videoSelector": "div.webPlayerElement video[src]"
}
}
Copied from Option page > Audio tab > View Supported Sites, and then added "unmuteDelay": 1000, which will extend time before unmuting for 1 second (1000ms). This value can be adjusted as needed.
I haven't been the best at keeping the Audio Sites wiki up-to-date, so for now the most authoritative source for the audio rules is probably here in the interface AudioRule section.
Fantastic! I had to switch to Firefox to use something newer than 2.8.0, but when I did it worked well. Thanks for pointing me to the feature!
Yeah, the Chrome release got held up, but it should hopefully be released in the next day or two. Firefox is usually really quick to approve the submission, so that is nice. I'm glad you got it working though! Let me know if you run into any trouble with it, or any feedback.
This happened to me when watching one of the new Jumanji movies. The line goes "or some s*** in this dumb *** hat". The audio didn't mute in time for the first one, but did in time for the second one.
One thing I observed about the delay setting (but haven't fully analyzed) is that chrome seems to need to be reloaded for the new delay setting to be effective. That works fine if you realize that's the case...just letting you know.
What do mean reloaded?
@nunyabeeswax7 Unfortunately the unmuteDelay option is only one way (extending how long to mute). That's because all the audio muting methods (aside from Cue) only have the caption/subtitle data when it would appear on the screen. Therefore, it isn't possible to mute before a word would appear. With a site that uses the Cue method, you can use the videoCueSync option to adjust the sync +/- (in seconds). Right now its not very friendly to use that option, but I'm hoping to get some time to add an option page to modify the available options for muting on a particular site.
@sl3uth You are correct - currently the filter loads the config when the page initially loads. If any config is changed, each tab has to be refreshed (reloaded) before the new changes are reflected. I am hoping to explore keeping one copy of the config in the background and share it between all the pages.
@nunyabeeswax7 The option is discussed in this comment, but basically you can copy the config from an existing site, put it into the custom audio sites box, and then add unmuteDelay there. Right now there isn't a good way to do it through the UI (yet), but I'm hoping to work on that in the next update or two.