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

Customize exoplayer to remove dark "curtain" #4071

Merged
merged 3 commits into from
Oct 24, 2023

Conversation

mcclure
Copy link
Collaborator

@mcclure mcclure commented Oct 23, 2023

In the new Tusky version, we switched from "old and busted" Android video player to "Exoplayer". This PR # 3857 was a collaboration between Nik and me.

In Nik's final commit, there is a dark "curtain" that displays on top of all videos, under the controls. I don't think this was ever discussed by anyone except me and Nik and I would like to revisit it. I find the curtain very distracting, it is like all videos display dark.

This patch removes the curtain, bringing closer to the Tusky 23.0 look. There are two problems:

  • This means if you ever watch a video which has a white background and fills an entire screen, you will not be able to see the buttons. I think this problem was present in 23.0 but it is still a problem. Possible fixes: - Edit the buttons to give them backgrounds so they display against any other color. - Similar to the small curtain at the top under the caption, place a small curtain at the bottom following only the buttons. I would be fine with a small button-covering curtain.

  • The controls are visible for much longer in Nik's exoplayer patch than in 24.0. They are visible for a full 5 seconds. I think the old length was 3 seconds. I think this is pretty long, but the old one was pretty short. I would suggest reducing it to 4 or maybe leaving it at 5 is ok.

@mcclure
Copy link
Collaborator Author

mcclure commented Oct 23, 2023

Left: Nik PR Right: This PR

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@android:color/transparent"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be @color/exo_bottom_bar_background so that the controls are still visible on light content

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this worked very well

@mcclure
Copy link
Collaborator Author

mcclure commented Oct 24, 2023

With Tak suggestion, it now looks more or less identical to the 23.0 layout (just with different icons).

Left: 23.0 Right: This PR.

I think this is now mergeable.

While testing this I discovered a bug. However the bug is also present in shipping 23.0, so it is not relevant to this PR.

@mcclure mcclure merged commit 1a10d5f into tuskyapp:develop Oct 24, 2023
3 checks passed
Tak pushed a commit that referenced this pull request Nov 1, 2023
I [posted our new video player layout] on Mastodon for comments and
multiple people said the buttons were too close together. I agree. I
added some space (I eyeballed it, I made it bigger until it felt too big
and then I narrowed it), I think we have now increased the space from
10dp to 25dp. I added the space by wrapping the buttons in
LinearLayouts, because they are <include>s and could theoretically
insert more than one button.

Concerns: If the "next"/"prev" buttons ever become active, the space
will not be correctly applied to those. We can fix that if it ever comes
up (we don't display those buttons). If people think the buttons should
be placed even further apart we can do this by just increasing the
number in styles.xml.

This is what it looks like now. See previous look and comparison with
23.0 in #4071

<img width=400
src="https://files.mastodon.social/media_attachments/files/111/293/547/524/867/101/original/91b83e1717111444.png">
@charlag charlag added this to the Tusky 24 milestone Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants