title: Videojs make the SWF Fallback Responsive
body: <p>I am currently using the <strong><a href="http://videojs.com/" rel="nofollow">videojs</a></strong> plugin, And i have managed to get it to be responsive with the following code:</p>
  
  <p><a href="http://jsfiddle.net/dawidvdh/RL5r2/2/" rel="nofollow"><strong>JSFIDDLE</strong> DEMO</a></p>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>videojs.options.flash.swf = "../../js/video-js.swf";
  
  // Once the video is ready
  videojs("#video").ready(function(){
  
      var myPlayer = this;    // Store the video object
      var aspectRatio = 4/3; // Make up an aspect ratio
  
      function resizeVideoJS(){
          // Get the parent element's actual width
          var width = document.getElementById(myPlayer.R).parentElement.offsetWidth;
          // Set width to fill parent element, Set height
          myPlayer.width(width).height( width * aspectRatio );
      }
  
      resizeVideoJS(); // Initialize the function
      jQuery(window).on('resize', function () {
          resizeVideoJS(); // Call the function on resize
      })
  });
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div class="feature-video"&gt;
          &lt;video id="video" class="video-js vjs-default-skin" controls preload="none"
                 poster="http://video-js.zencoder.com/oceans-clip.png"
                 data-setup="{}"&gt;
              &lt;source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' /&gt;
              &lt;source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' /&gt;
              &lt;source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' /&gt;
      &lt;/video&gt;
  &lt;/div&gt;
  </code></pre>