Embedded Media Player

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
daebat
Forum Commoner
Posts: 47
Joined: Mon May 11, 2009 10:16 am

Embedded Media Player

Post by daebat »

I am using an embedded media player on my website and I can't seem to get the video to resize to the width that I give it. It seems to just make a box at 300x300 and display only 300 pixels of the original size of the movie. How can I get the vid to resize to fit the window I created at 300 x 300?

Code: Select all

     <OBJECT id='mediaPlayer' width="300" height="300" 
      classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' 
      codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
      standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
      <param name='fileName' value="VIDEO.mpg">
      <param name='animationatStart' value='true'>
      <param name='transparentatStart' value='true'>
      <param name='autoStart' value="false">
      <param name='showControls' value="true">
      <param name='loop' value="false">
      <EMBED type='application/x-mplayer2'
        pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
        id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
        bgcolor='darkblue' showcontrols="true" showtracker='-1' 
        showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="300" height="300"
        src="VIDEO.MPG" autostart="0" designtimesp='5311' loop="true">
      </EMBED>
      </OBJECT>
jaiswarvipin
Forum Commoner
Posts: 32
Joined: Sat Sep 12, 2009 3:43 pm
Location: India

Re: Embedded Media Player

Post by jaiswarvipin »

Use Javascript.

Code: Select all

 
<script language="javascript">
<!--
function reSezePlayer(pIntWidth, pIntHeight)
{
               document.getElementById('mediaPlayer').width= pIntWidth;
               document.getElementById('mediaPlayer').width= pIntHeight;              
}
-->
</script>
 
and call this javascript function at you event object.
Post Reply