Skip to content

Stuck at max-height of 150px, YouTube or Vimeo #626

@marqpdx

Description

@marqpdx

Current Behavior

Using the following code, i am getting a video embed that is only 150px high. The width is variable, but extends to full screen width, but height stays at 150px.

<ReactPlayer
    className='react-player'
    url='https://www.youtube.com/watch?v=ysz5S6PUM-U'
    width='100%'
    height='100%'
/>

the css is:

.vid-wrapper  {
  position: relative;
  padding-top: 56.25% /* Player ratio: 100 / (1280 / 720) */
}

.react-player {
  position: absolute;
  top: 0;
  left: 0;
}

I tried adding a height=360px parameter to the player, tried it w/o the responsive wrapper, tried changing the padding-top, tried YouTube and Vimeo, and every time it is only 150px high.

The embed code for the YouTube is as follows, and the browser code inspector reveals that the height of all parent HTML elements to the video player is 600+ pixels.

<iframe width="1105" height="150" src="https://www.youtube.com/embed/ysz5S6PUM-U" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Given that the embed code is 150px height, i figure the issue is not in my code (unless it is).

Expected Behavior

The video to be proper dimensions

There is a screenshot attached.

Any thoughts?

Thank you!
m

Screen Shot 2019-04-17 at 9 24 47 PM

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