Scaling embedded content to fit window ? Flash or HTML5 Video
<p>I have a panorama video that was created with a commercial product.  I would like to scale the video to fit the browser width.  The code in the web inspector is:</p>

<pre><code>&lt;body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" onload="pageInit();"&gt;
  &lt;script type="text/javascript" src="swfobject.js"&gt;&lt;/script&gt; 
  &lt;div id="flashcontent" width="1921" height="540&gt; 
    To view virtual tour properly, Flash Player 9.0.28 or later version is needed. 
    Please download the latest version of &lt;a href=" http:="" www.adobe.com="" go="" getflashplayer"="" target="_blank"&gt;
    &lt;embed type="application/x-shockwave-flash" src="twviewer.swf" style="undefined" id="sotester" name="sotester" bgcolor="#FFFFFF" quality="high" allownetworking="all" allowscriptaccess="always" allowfullscreen="true" scale="noscale" wmode="direct" flashvars="lwImg=&amp;amp;lwBgColor=0,255,255,255&amp;amp;lwBarBgColor=255,255,255,255&amp;amp;lwBarColor=255,0,255,0&amp;amp;lwBarBounds=1072,270,0,0&amp;amp;lwlocation=0&amp;amp;lwShowLoadingPercent=true&amp;amp;lwTextColor=255,0,0,0&amp;amp;buildSN=7.98.151110&amp;amp;iniFile=config_A303_Pano.bin&amp;amp;progressType=1&amp;amp;swfFile=&amp;amp;percentType=0&amp;amp;sizeFile=&amp;amp;href=http://caboleisure.com/panoramas/A303_Pano_Auto/_auto/flash/Tourweaver_A303_Pano.html&amp;amp;lwbounds=&lt;!-%% videobounds %%-&gt;" height="540" width="1921"&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
    var jsReady = false;

    function isJsReady() {
      return jsReady;
    }

    function pageInit() {
      jsReady = true;
    }

    function thisMovie(movieName) {
      return document.getElementById(movieName);
    }

    function changeSceneOnLoad() {
      var search = window.location.search;
      var s = search.substring(1);
      var arr = s.split("&amp;");
      var json = {};
      for(var i = 0; i &lt; arr.length; i++) {
        var str = arr[i];
        var key = str.split("=")[0];
        var value = str.split("=")[1];
        json[key.toLowerCase()] = value;
      }
      var firstValue = json['firstscene'];
      var panoid = decodeURI(firstValue);
      if(panoid != "undefined") {
        if(thisMovie("sotester").twAPI) {
          setTimeout(function() {
            thisMovie("sotester").twAPI("switchToScene", panoid);
          }, 500);
        } else {
          setTimeout(changeSceneOnLoad, 1000);
        }
      }
    }
    // &lt;![CDATA[ 
    var so = new SWFObject("twviewer.swf", "sotester", "1921", "540", "9.0.0", "#FFFFFF");
    so.addParam("allowNetworking", "all");
    so.addParam("allowScriptAccess", "always");
    so.addParam("allowFullScreen", "true");
    so.addParam("scale", "noscale");
    so.addParam("wmode", "direct");
    //&lt;!-%% Share Mode %%-&gt;
    so.addVariable("lwImg", "");
    so.addVariable("lwBgColor", "0,255,255,255");
    so.addVariable("lwBarBgColor", "255,255,255,255");
    so.addVariable("lwBarColor", "255,0,255,0");
    so.addVariable("lwBarBounds", "1072,270,0,0");
    so.addVariable("lwlocation", "0");
    so.addVariable("lwShowLoadingPercent", "true");
    so.addVariable("lwTextColor", "255,0,0,0");
    so.addVariable("buildSN", "7.98.151110");
    so.addVariable("iniFile", "config_A303_Pano.bin");
    so.addVariable("progressType", "1");
    so.addVariable("swfFile", "");
    so.addVariable("percentType", "0");
    so.addVariable("sizeFile", "");
    so.addVariable("href", location.href);
    so.addVariable("lwbounds", "&lt;!-%% videobounds %%-&gt;");
    so.write("flashcontent");
    changeSceneOnLoad();
    // ]]&gt;
  &lt;/script&gt; 
&lt;/body&gt;
</code></pre>

<p>A url for the page is here:  <a href="http://caboleisure.com/panoramas/A303_Pano_Auto/_auto/flash/Tourweaver_A303_Pano.html" rel="nofollow">Panorama</a></p>

<p>I've tried a few suggestions, like the one described here:</p>

<p><a href="https://fettblog.eu/blog/2013/06/16/preserving-aspect-ratio-for-embedded-iframes/" rel="nofollow">Preserving aspect ratio for embedded iframes</a></p>

<p>but that doesn't work.  I am actually using this page as an embedded iframe from another page, but if I can get his page to scale correctly that isn't a problem.  Any suggestions would be appreciated.</p>