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

Fix vertical video hiding title and controls #1081

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

mrpolanco
Copy link
Contributor

Fixes #1034

Vertical video height does not obey bounds and overlays the title and podcast description/is clipped by the Now Playing heading.

To test

Downloaded two videos locally to test, one in landscape mode, and the other with a vertical aspect ratio (the latter the same as referenced in the original report):

Referenced vertical aspect video: https://en1.y2mate.is/w0p4c/watch?v=AQOm1WCV-g4

Test landscape aspect video: https://en1.y2mate.is/w0p3b/watch?v=C0DPdy98e4c

Once the videos were downloaded locally, they were dragged to the Photos app in each simulator, opened, and then shared with the Pocket Casts application:

iPhone 14 Pro - Adding videos

Once added, videos can be accessed by clicking on the Profile tab, and Files:

iPhone SE (3rd generation) - play added files

The current issue for vertical videos (it hides the title and the top is clipped by the Now Playing heading for vertical videos). Landscape aspect videos do not present these issues:

iPhone SE (3rd generation) - vertical video cropped

Issue fix tested on various devices, including landscape video:

iPhone SE 3rd Gen:

iPhone SE (3rd generation) - fix vertical landscape

iPad 10th Gen - The issue was also present, both in portrait and landscape orientations:

Before fix:

iPad (10th generation) - vertical issue

After fix:

iPad (10th generation) - vertical video

Checklist

  • ✅ I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
    Rich: Nothing is needed, as it falls under general bug fixes.

  • ✅ I have considered adding unit tests for my changes.
    Rich: Unit tests not deemed necessary.

  • ✅ I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.
    Rich: Requesting updates to the spreadsheet, if any are needed.

@mrpolanco mrpolanco requested a review from a team as a code owner August 30, 2023 16:10
@mrpolanco mrpolanco linked an issue Aug 30, 2023 that may be closed by this pull request
Copy link
Member

@leandroalonso leandroalonso left a comment

Choose a reason for hiding this comment

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

@mrpolanco thanks for working on this fix and for the detailed review instructions!

I found two issues while reviewing:

Constraints warning

After your changes, there are constraint warnings shown in the console for portrait videos:

2023-09-06 10:54:16.217999-0300 podcasts[4722:40251] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x6000011199f0 podcasts.VideoPlayerView:0x1176e8590.height == 354   (active)>",
    "<NSLayoutConstraint:0x600001289630 podcasts.VideoPlayerView:0x1176e8590.height == 330   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x6000011199f0 podcasts.VideoPlayerView:0x1176e8590.height == 354   (active)>

Basically we need just one place setting this constraint, otherwise the system gets confused as to which it should respect.

Video on iPad is small

Using the video you shared on a big iPad (Pro 12.9") the video is quite small:

Before After
Simulator Screen Shot - iPad Pro (12 9-inch) (5th generation) - 2023-09-06 at 11 16 22 Simulator Screen Shot - iPad Pro (12 9-inch) (5th generation) - 2023-09-06 at 11 23 29

I think the best approach here would be to fill the available space with the video. Wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

This change is not needed for this fix. Probably the system changed and you committed by mistake.

Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

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.

Vertical video hiding title and controls
2 participants