Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBO Max #222

Closed
richardfrost opened this issue Jun 7, 2020 · 9 comments
Closed

HBO Max #222

richardfrost opened this issue Jun 7, 2020 · 9 comments
Labels
Enhancement New feature or request Help Wanted Extra attention is needed

Comments

@richardfrost
Copy link
Collaborator

richardfrost commented Jun 7, 2020

🎥 The Site

play.hbomax.com

💬 Subtitle Element/Node

Example:

<span style="font-family: font0; font-size: 45px; font-style: normal; text-decoration: none; text-transform: none; letter-spacing: 0px; color: rgb(255, 255, 255);">"Massah William!</span>

📝 Additional notes

Requested through the Chrome Web Store support page.

@richardfrost richardfrost added the Enhancement New feature or request label Jun 7, 2020
@richardfrost
Copy link
Collaborator Author

richardfrost commented Jun 7, 2020

This is a tough one to get all the current features working on it. I prefer using mutation-based rules because they are more timely than a watcher-based rule (check every 20ms). With adding a couple new features to the filter, I was able to get muting to work, but caption hiding is problematic. I don't think there is a way to make it work relying solely on mutations, and as such will probably have to move to a "watcher" mode for that.

The issue is that on multi-line captions, each is in its own mutation, so there isn't a good way to know if there is another line coming. For now, I think I'll probably just set it to show all captions/subtitles. If someone is interested in hiding all text, I can give a custom config for that. Its the selective (show only filtered/unfiltered) mode that is problematic.

Also, they do some CSS class obfuscation. Currently, class3 is used for the default caption settings. If you change them, the filter will likely not work unless you update that class. It wouldn't surprise me if these change in the future, which will also break filtering. If that's the case, we'll need to update that class name, or perhaps introduce some code that can identify the "right" class at runtime.

tl;dr

  • Working:
    • Muting
    • Filtering captions/subtitles
  • Not Working:
    • Hiding captions/subtitles

@richardfrost
Copy link
Collaborator Author

richardfrost commented Jun 7, 2020

If anyone has a subscription to HBO Max and would be willing to help test this, I would appreciate it!

How to load an unpacked/development extension

Pre-release Builds:

Now available in Version 2.7.5.

@richardfrost richardfrost added the Help Wanted Extra attention is needed label Jun 9, 2020
@richardfrost
Copy link
Collaborator Author

This is now included in version 2.7.5, but with the same caveat as above (Can't selectively hide or show captions/subtitles).

@richardfrost
Copy link
Collaborator Author

richardfrost commented Jun 12, 2020

I've had a few times now where the muting won't work until I refresh the page. I'm not sure why that's happening, but it might be worth it to add a word like the temporarily to the filter to test it on a video, just to be sure its working for your viewing session.

@richardfrost richardfrost reopened this Jun 16, 2020
@richardfrost
Copy link
Collaborator Author

richardfrost commented Jun 16, 2020

For now, it looks like you have to click on "RESET" in the CC/subtitles menu for muting to work.

Alternatively, add this to your custom audio config:

{
  "play.hbomax.com": [
    {
      "mode": "elementChild",
      "parentSelectorAll": "div.class28 > span",
      "showSubtitles": 0,
      "tagName": "SPAN"
    }
  ]
}

If you want to use another CC/subtitle display setting, right now you'll have to find its associated CSS class (like class28 above) and update the rule to match.

@richardfrost
Copy link
Collaborator Author

I'm curious if anyone could give this new config a try:

{
  "play.hbomax.com": [
    {
      "mode": "elementChild",
      "parentSelectorAll": "div.class3 > span, div.class28 > span",
      "showSubtitles": 0,
      "tagName": "SPAN"
    }
  ]
}

I don't currently have an account, but I'll try to it when I'm able.

@erichca
Copy link

erichca commented Jan 10, 2021

I can't get the audio muting to work on hbo max. The captions do replacement successfully but no audio mute.

@richardfrost
Copy link
Collaborator Author

Hey @erichca, sorry for such a slow response. I thought I replied, but obviously I didn't. Anyway! I appologize that filtering on HBO Max still has some quirkiness. Can you share a screenshot of your caption/subtitle settings on HBO Max?

image

If you would rather, maybe just try pressing the Reset button, and then refresh the page and see if it works. Right now the filter is only working with the defaults/reset config. If you have a specific setup that you'd like to use, let me know and I can probably setup a custom config for you to use.

@richardfrost
Copy link
Collaborator Author

Version 2.19.0 changed the method that HBO Max is using. This new mode was designed to handle different subtitle options (where before it needed to be the default, or every once in a while the subtitle settings for HBO Max had to be reset). I had a few people test it with success, but if you try it out, please let me know how it works for you. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants