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

Bug fix: Make sure we calculate correctly the video player height #1083

Merged
merged 1 commit into from
Mar 27, 2014

Conversation

LeResKP
Copy link
Contributor

@LeResKP LeResKP commented Jan 21, 2014

If we want the video player get the same size of its container we set defaultVideoWidth and defaultVideoHeight to 100%. In that case the calculation of newHeight is not correct, so we get the container height

@@ -755,6 +755,11 @@
parentWidth = t.container.parent().closest(':visible').width(),
newHeight = t.isVideo || !t.options.autosizeProgress ? parseInt(parentWidth * nativeHeight/nativeWidth, 10) : nativeHeight;

// When we use percent, the newHeight can't be calculated so we get the container height
if(isNaN(newHeight)) {
t.container.parent().closest(':visible').height();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't you be assigning that value to newHeight?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh god, a bad copy/paste...
The request is updated!

… calculate newHeight so we get the container height
johndyer added a commit that referenced this pull request Mar 27, 2014
Bug fix: Make sure we calculate correctly the video player height
@johndyer johndyer merged commit 99076bc into mediaelement:master Mar 27, 2014
rexblack pushed a commit to rexblack/mediaelement that referenced this pull request May 22, 2014
Bug fix: Make sure we calculate correctly the video player height
ale-grosselle pushed a commit to ale-grosselle/mediaelement that referenced this pull request Nov 25, 2016
Bug fix: Make sure we calculate correctly the video player height
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.

3 participants