viewport resize event
<p>I am new to all of this and can't figure out how to resize the flash player I use for my home media server when the window is resized or orientation changes. I am basing the player size on the size of the viewport. I have searched and tried various versions but they don't work which is most likely due to my lack of knowledge.
Most of the code below was already done, I have commented what I added here for reference.</p>

<p><a href="http://173.27.137.207:52190/Gizmo/play_flash.html?File=526828" rel="nofollow"><strong>Link to a sample</strong></a></p>

<p><strong>viewport.js</strong> (added by me)</p>

<pre><code>var width = $(window).width();
var height = $(window).height();
</code></pre>

<p><strong>html</strong></p>

<pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;Gizmo play_flash&lt;/title&gt;
&lt;meta name="keywords" content="" /&gt;
&lt;meta name="description" content="" /&gt;
&lt;meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /&gt;
 &lt;script type="text/javascript" src="scripts/jwplayer.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="scripts/viewport.js"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;meta http-equiv="refresh" content="2; URL=noscript.html"&gt;&lt;/noscript&gt;
&lt;/head&gt;

&lt;body style="margin: 0; padding: 0; background-color: #000000"&gt;
&lt;div id="outer"&gt;

    &lt;div class="player_wrapper" style="width: 100%; height: 100%; margin:0px auto;"&gt;
        &lt;div id="player"&gt;
            Loading the video player ...
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;script type="text/javascript"&gt;
        jwplayer('player').setup({
            'flashplayer': 'scripts/player.swf',
            'file': '[File.FlashLink]',
            'autostart': 'true',
            'duration': '[File.Duration]',
            'provider': 'scripts/jrmediaprovider.swf',
            'skin': 'scripts/glow.zip',
                    &lt;!--begin mod--&gt;
            'width': width - 5,
            'height': height - 5
                    &lt;!--endmod--&gt;
        });

        jwplayer('player').onComplete(
            function(event) { 
                try {
                    window.Gizmo.onComplete();
                } catch (err) { }
            }
        );
    &lt;/script&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
