Skip to content

Player crops portrait videos on default configs #79

Closed

Description

@victorges

Our default configuration options on the player currently use:

  • Aspect ratio: 16:9 (this enforces the aspect ratio of the player, even if the video is in a different ratio)
  • Object fit: cover (which means "fill" instead of "fit" to area)

While this works well for landscape videos. If they are not exactly on 16:9 aspect ratio, they will be cropped on the sides to fill the player area, which can look better than adding black bars to them.

With portrait videos tho, this effectively means that we crop around ~70% of the video, displaying only the very center of it. This means that applications that want to show portrait videos will need to make custom configurations on the player to get minimum functionality working.

IMO the best fix for this would be defaulting the Object Fit to contain, which means to fit the video on the player area adding black bars to the sides. This will work well on all cases instead, by also adding black bars to landscape videos not exactly 16:9, which is a fine compromise to me. This is not the consensus tho, so let's talk about it to decide.

Activity

  1. 0xcadams commented on Oct 5, 2022

    @0xcadams
    Contributor

    See here for details. Moving this to a discussion. https://livepeerjs.org/react/Player#objectfit

  2. locked and limited conversation to collaborators on Oct 5, 2022
  3. converted this issue into a discussion #87 on Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions