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 initial aspect ratio #466

Merged
merged 5 commits into from
Mar 14, 2024
Merged

Fix initial aspect ratio #466

merged 5 commits into from
Mar 14, 2024

Conversation

MGaetan89
Copy link
Member

@MGaetan89 MGaetan89 commented Mar 12, 2024

Pull request

Description

This PR fixes various issues related to video size, aspect ratio and media transition:

  • The default aspect ratio for video is no longer 1:1, preventing the jump to the actual ratio once the video has started to load
  • When transitioning from a video to an audio, the last frame of the video doesn't remain on the screen while the audio is playing
  • The surface used to play the media is not created for audio content

Changes made

  • Use the current tracks to get the media aspect ratio, instead of the video size
  • Set the default aspect ratio in PlayerSurface to 0, meaning that we don't display any surface
    • The integrator can still pass a default aspect ratio to override this
  • The surface used to play media is no longer created for audio content

Checklist

  • Your branch has been rebased onto the main branch.
  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).
  • All pull request status checks pass.

@MGaetan89 MGaetan89 linked an issue Mar 12, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Mar 12, 2024

Code Coverage

Overall Project 53.38% -0.94% 🟢
Files changed 4.83% 🟢

Module Coverage
:pillarbox-player 69.24% -0.2% 🟢
:pillarbox-ui 0% -2.83% 🟢
Files
Module File Coverage
:pillarbox-player PlayerCallbackFlow.kt 70.72% -0.93% 🟢
:pillarbox-ui PlayerSurface.kt 0% -21.01% 🟢
ComposablePlayer.kt 0% 🟢

@MGaetan89 MGaetan89 force-pushed the 463-fix-initial-aspect-ratio branch from 756ccec to c596cae Compare March 13, 2024 08:05
@MGaetan89 MGaetan89 force-pushed the 463-fix-initial-aspect-ratio branch from a60c020 to e2d12a7 Compare March 13, 2024 16:02
@StaehliJ StaehliJ enabled auto-merge March 14, 2024 08:17
@StaehliJ StaehliJ added this pull request to the merge queue Mar 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 14, 2024
@MGaetan89 MGaetan89 added this pull request to the merge queue Mar 14, 2024
Merged via the queue into main with commit c4c141c Mar 14, 2024
10 checks passed
@MGaetan89 MGaetan89 deleted the 463-fix-initial-aspect-ratio branch March 14, 2024 08:56
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.

Fix initial aspect ratio
2 participants