Skip to content

Facebook videos not fitting properly in the container #1071

Description

@sagarchoudhary96

Current Behavior

While trying to play Facebook Video, in a modal using react-player, it's not taking the given height of the modal and sometimes based on video either overflows or is of less width resulting in non-uniform layout. The issue i think its because of the aspect-ratio maybe in which the Facebook returns iframe.

Rest all videos from youtube, Vimeo seems to be fitting properly taking the given height and width.

Expected Behavior

I want the video to fit in the given space in modal similar to how it happens on the facebook page.
Screenshot 2020-11-10 at 12 28 27 PM

Steps to Reproduce

I have created the sandbox for it where it can be tested.

  1. change the value of url in this object in NewVideoModal.js file
const defaultOptions = {
  url: testUrls[1],
  playing: true,
  controls: true,
  light: true
};

for 1st URL i.e youtube , it works fine, i need it to be similar for facebook links also.
for 2nd and 3rd URL from the testUrls array, you can see the issue. for 2nd URL the video overflow and controls are hidden. for 3rd URL the video is of lesser height than the container so extra padding at bottom can be seen.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions