feat(YouTube - Hide player flyout menu components): Add "Hide Audio track footer", "Hide Audio track header", "Hide Captions footer", and "Hide Captions header" settings#642
Conversation
…u header" and "Hide Quality menu header" settings
...c/main/java/app/morphe/extension/youtube/patches/components/PlayerFlyoutMenuItemsFilter.java
Outdated
Show resolved
Hide resolved
…u footer", "Hide Captions menu header", and "Hide Quality menu header" settings
a267c29 to
2731eab
Compare
|
All that time wasted and nothing happened. Damn. Well, try to mark this draft and wait for @inotia00 to get some free time and take a look at this. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
# Conflicts: # extensions/youtube/src/main/java/app/morphe/extension/youtube/patches/components/PlayerFlyoutMenuItemsFilter.java
91000af to
64eb86a
Compare
# Conflicts: # extensions/youtube/src/main/java/app/morphe/extension/youtube/patches/components/PlayerFlyoutMenuComponentsFilter.java
|
@0xrxL, do you have any methods to hide these headers and footers? |
Post a screenshot of what you want to hide. |
|
Yes, I already have a way to do that: In the case of video quality, it uses the same trick of the resolutions flyout, to open it through the performClick(). You just need to hook to that class and find the right parent to hide. That's all. |
|
And how do I identify the right parent? |
I'll give you a code to use. Wait a while. 👍 |
|
@ILoveOpenSourceApplications This is the logic for resolutions flyout. Readapt it for Morphe:
|
|
The exact same logic works for captions flyout too, just change this line: to this: |
|
P.S: The hook is obviously the same already used to automatically open the advanced resolutions flyout. |
|
I managed to hide the captions menu footer text, but the padding remained. Also, I couldn't get the quality menu header and footer to be hidden, what did I do wrong? |
The code that I provided only hide footer. If you want to hide header, use the same code, but with a different child object. P.S: About padding. I didn't found a solution. |
|
For example instead to hide the last object based on length, hide the first. |
|
@0xrxL, I was able to hide the captions menu footer but if the header is also hidden, then the divider pops out. But no matter what I do, I can't get the quality menu header and footer to hide. @LisoUseInAIKyrios, any idea what's going on? |
| footer.setVisibility(View.GONE); | ||
| } | ||
|
|
||
| View bottomDivider = viewGroup.getChildAt(childCount - 2); |
There was a problem hiding this comment.
Are these hard coded values wrong if other components are also being hidden?
There was a problem hiding this comment.
@ILoveOpenSourceApplications When you hide an element, there is a possibility that the item you are going to hide contains more than one element. So you have to further unpack the child elements.
That's why hiding the header also gives you the first button hidden.
There was a problem hiding this comment.
What about Quality header and footer? Is the path not correct? is it not advanced_quality_sheet_content?
There was a problem hiding this comment.
What about Quality header and footer? Is the path not correct? is it not
advanced_quality_sheet_content?
The path is right, but you're trying to hide the wrong element, because if you hide only the header but also the first button is also hidden, at this point there are other elements inside (and you just use getElementAt).
There was a problem hiding this comment.
Yes, captions menu now looks good. But quality menu, nope.
|
It looks like you've managed to do it. As you can see, you don't have to panic. 😁 |
e889b7c to
4727107
Compare
|
I gave up on quality menu. I just can't seem to make it hide the header and footer. I just don't know why. Anyone else is welcomed to push a commit if they found a way, if not, this can be merged as is. |
b074352 to
2e56c52
Compare
|
I was so busy that I couldn't even turn on my laptop for two weeks. I will review the PR when I have time. |






Description
Adds options to hide Audio track menu and Captions menu header and footer.
Additional context
Just like #48, "Hide Quality header" only works on quick quality menu and not on advanced quality menu.
Test results