0

I have a simple html5 video tag:

<div id="videoBox">
  <video id="video" width="100%" controls loop>
    <source src="some_url"></scource>
  </video>
</div>

The problem is that how can I get the current height of the video? I have tried by jquery:

$('#videoBox').height();

it return me the size 600px;
but I inspect the div on the page, I see the height is 372px;
So I want to get the value 372px,not 600px.
How can I solve this problem?

Steven Liu
  • 11
  • 1
  • Possible duplicate of [How can I get the html5 video element's width and height](https://stackoverflow.com/questions/10512529/how-can-i-get-the-html5-video-elements-width-and-height) – caramba Dec 20 '17 at 02:20
  • Try that : $('#video').height(); and tell us what you get – SKJ Dec 20 '17 at 04:09
  • I tried `$('#video').height();`, it's the same value of `$('#videoBox').height();` – Steven Liu Dec 20 '17 at 06:01

0 Answers0