title: Video dimensions dynamically
body: <p>I have on my HTML page video player and player change dimensions depends on browser window side. So On start my video is 1280x720, and when I make my browser window smaller, my video is also smaller. I want to add button which will print to console current dimensions of video. I tried like this:</p>
  <pre><code>&lt;button onclick=&quot;getDimensions()&quot;&gt;getDimensions&lt;/button&gt;
  
    &lt;script&gt;
        const myVideo = document.getElementById(&quot;video1&quot;);
        
        function getDimensions() {
          let height = myVideo.videoHeight;
          let width = myVideo.videoWidth;
          console.log(height, width);
        }
   &lt;/script&gt;
  </code></pre>
  <p>but this code only print start dimensions 1280x720px. Does anyone have idea how to fix this?</p>