Results 1 to 2 of 2

Thread: How to activate autosize in script for video embedding

  1. #1
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to activate autosize in script for video embedding

    Hi.

    I found this script that resolves my problem posted in http://www.dynamicdrive.com/forums/s...ad.php?t=19828

    It works perfectelly, but I stil have an issue.
    Could someone please have a look at this script and tell me how to adapt the size of the media player so that it adapts itself to the size of my video?
    I see that a parameter autosize exists. I suppose it should be on 1.
    But what to do with Wide and Height?


    The sript is:

    <OBJECT id='mediaPlayer' width="320" height="240"
    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="http://mydomain.com/video.wmv">
    <param name='animationatStart' value='1'>
    <param name='transparentatStart' value='1'>
    <param name='autoStart' value='1'>
    <param name='ShowControls' value='0'>
    <param name='ShowDisplay' value='0'>
    <param name='ShowStatusBar' value='0'>
    <param name='loop' value='0'>
    <EMBED type='application/x-mplayer2'
    pluginspage='http://microsoft.com/windows/mediaplayer/ en/download/'
    id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='0'
    bgcolor='darkblue' showcontrols='0' showtracker='1'
    showdisplay='0' showstatusbar='0' videoborder3d='0' width="320" height="240"
    src="http://mydomain.com/video.wmv" autostart='1' designtimesp='5311' loop='0'>
    </EMBED>
    </OBJECT>


    Thanks in advance.

  2. #2
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I found a solution:

    I found one!

    <?> Copy & paste the following...

    <!-- begin embedded WindowsMedia file... -->
    <table border='0' cellpadding='0' align="left">
    <tr><td>
    <OBJECT id='mediaPlayer' width="320" height="285" 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="http://servername/path/to/media.file">
    <param name='animationatStart' value='true'>
    <param name='transparentatStart' value='true'>
    <param name='autoStart' value="true">
    <param name='showControls' value="false">
    <param name='loop' value="true">
    <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="320" height="285"
    src="http://servername/path/to/media.file" autostart="true" designtimesp='5311' loop="true">
    </EMBED>
    </OBJECT>
    </td></tr>
    <!-- ...end embedded WindowsMedia file -->
    <!-- begin link to launch external media player... -->
    <tr><td align='center'>
    <a href="http://servername/path/to/media.file" style='font-size: 85%;' target='_blank'>Launch in external player</a>
    <!-- ...end link to launch external media player... -->
    </td></tr>
    </table>




    To autosize, just replace

    <OBJECT id='mediaPlayer' width="320" height="285"

    by

    <OBJECT id='mediaPlayer' autosize='-1'

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •