Welcome to WebmasterWorld Guest from 54.211.82.105

Forum Moderators: open

Message Too Old, No Replies

Static preview for WMV on load

How to avoid black screen before video plays.

     
8:22 pm on Apr 7, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 3, 2003
posts: 161
votes: 0


Hi,

A client wants me to post a video on her site. It is in WMV format. I have it embedded, but it is just a block box with controls until you press play. Is there a way to show the first frame instead of the black box?

The code I'm using:

<object id='mediaPlayer' width="190" height="200" 
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="files/themovie.wmv">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='false'>
<param name='controller' 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" width="190" height="200"
src="files/themovie.wmv" autostart="false" designtimesp='5311' loop="false">
</embed>
</object>
3:11 am on Apr 16, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 4, 2004
posts:877
votes: 0


I believe there is a parameter to use a background image, you'll need screenshot first. The trouble with your code is cross browser and cross platform compatibility. That's why flash players are so popular for video. It eliminates those problems.

If you have to use WMV do a search for some of the Silverlight players.