How to eliminate the animation display in Windows Media Player

Posted on 2008-10-01
Last Modified: 2013-12-07
I have successfully placed a Windows Media Player object in my web page but since I am using it to play an audio file instead of video, I would prefer that the video portion of the player, not display so that only the controls are visible.

I have reduced the height of the player from the standard 290px to 50px and that solves my problem using IEv7, but neither FireFox, Safari, or viewing the page on my iPhone, respect the smaller size player. Might someone know which parameter I need to change to eliminate the unneeded "video" portion of the object?
Question by:lepirtle
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
LVL 14

Expert Comment

ID: 22619590
I couldn't find any parameter that would do it, but found a workaround:  if you wrap your object in a div like this:  <div style="height:50px;width:auto;">   it seems to work in both IE and FF.

Author Comment

ID: 22619776
Hi yessirnosir,
Thanks for the quick response but I tried your suggestion and am still getting the same results.
LVL 14

Expert Comment

ID: 22620786
Ok, I'm stumped.  Have attached a screen shot and the accompanying test code to show you why I thought I'd solved it:   I put some text before and after the WMP.  Originally it left white space equal to the size of the full video player before the second text line.  After adding the fixed height div, it brought the second text line right up below the WMP.  So I thought it was fixed.  But what I didn't notice is that the scroll bar on the right is active, which means Firefox thinks there is something bigger on the page, i.e. the full size player.   You can even see when the page load that it goes very briefly into full screen mode and then immediately collapses to the small size once it realizes it is playing an audio file.

I messed around with it some more and couldn't get any better result.  Maybe someone else will chime in to help.
<div> some text before </div>
<div style="height:46px;width:320px;">
<object id="MediaPlayer" height=46 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase=",4,7,1112"> 
<param name="Showcontrols" value="True"><param name="autoStart" value="False"><embed type="application/x-mplayer2" src="Bad Company - Bad Company - 160 kbps.mp3"></embed>
<div>some text after</div>

Open in new window

RoboForm Secure Password Management System

RoboForm Everywhere - Superb Browser Support
Windows / Apple / IOS / Android / Linux / Chrome OS
Use different complex passwords everywhere
Best Secure Password Management by far
Synchronize all of your devices instantly
Safe, Secure & Highly Recommended!


Author Comment

ID: 22624485
Thanks for the detail and screenshot.

Here is even more confusing information. I changed my code, per your instruction to add the div tags and, as I had written, the results were still the same, that is, I could not get FireFox or Safari to shrink the height of the media player. So this morning I returned my code to the way it was (without your div tag suggestions) and I mentioned the problem I am having to my wife and she brought up my page on her computer (another WIN XP machine also using FF 3.0.3) just to take a look, and on her machine the media player displays just the way I want it, that is hiding the "video display" portion of the player PLUS, GET THIS: the audio autostarts. Keep in mind that this is after I had removed your div tags so that the page is using the original code that I had written - not with your div tag suggestions - AND the "AutoStart" parameter is "False" (I have never made changes to that parameter). So now I am completely puzzled as to why/how the browser's handling the media player object is overriding the code that you and I have written.
LVL 14

Accepted Solution

yessirnosir earned 500 total points
ID: 22625451
Success... (I hope!)... noticed that the "height" parameter shows up twice, and right now the second instance says "290".  Change to "50" and that seems to work.  

Have attached updated code below.  I actually changed the 50 to 45, which seemed to me to be a closer fit to the final size.  

Also, you can get rid of the javascript references in the header, and the </noscript> tag near the bottom, because both of those are orphans if you are not using the Javascript method to display the player.  And you really shouldn't wrap an object with a <p> tag -- better to use a <div>.  Code below.  Crossing my fingers that this looks the same on your machine as it does on mine!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>It's A Beautiful Day-White Bird</title>
<body bgcolor="#FFFF99" style="font-family:Arial, Helvetica, sans-serif">
<p align="center"><img src="whitebird.jpg" width="600" height="600" alt="It's A Beautiful Day" /></p>
<p align="center">Click the player button below to hear the White Bird track</p>
<div align="center">
<object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="320" height="45" id="mediaplayer1" title="Windows Media Player">
  <param name="FileName" value="whitebird.mp3" />
  <param name="AutoStart" value="False" />
  <param name="ShowControls" value="True" />
  <param name="ShowStatusBar" value="True" />
  <param name="ShowDisplay" value="False" />
  <param name="AutoRewind" value="True" />
  <embed type="application/x-mplayer2" pluginspage=""
  src="whitebird.mp3" width="320" height="45" autostart="False" filename="whitebird.mp3" showcontrols="True" showstatusbar="True" showdisplay="True" autorewind="True"></embed>

Open in new window

LVL 14

Expert Comment

ID: 22625495
re:  50 vs. 45, this may be browser dependent, because I just checked IE, and the 45 seems to chop off a bit of the player, while in Firefox the player has a different look and 45 is just fine.  May be better to go back to 50 because Firefox seems to adjust down to 45 a split second after displaying the full 50.

Author Comment

ID: 22625687
Thanks for pointing out my errors. I cleaned up my code as you suggested and your crossed fingers worked <g>: the player now looks the way that I want. The weird thing is that my wife's browser (same as mine: Windows XP and FF 3.0.3) still autoplays the audio but that is not a big problem, just a curiosity.

My hearty "Thanks" for all the help you have given me. I really appreciate it. Good Job!!

LVL 14

Expert Comment

ID: 22625931
glad it worked!
I just googled that Firefox autostart problem and found a suggestion to use 1/0 instead of True/False.  So I changed the "False" to "0" in the test code, and it seems to work.

Author Comment

ID: 22626247
Hi yessirnosir,
You are very thorough.

I posted that change to the autostart parameters in my page and now both my FF AND my wife's FF respected it. So once again, thank you very, very much!
LVL 14

Expert Comment

ID: 22626464
you're welcome...  I was just enjoying mellowing out to "White Bird" while I tried to figure it out!

Author Comment

ID: 22626800
I was talking to someone a couple of nights ago, who inquired about some of my favorite songs and I mentioned "White Bird". Since she was 20 years younger, she was unfamiliar with the song so I created that page for her to enjoy the pleasures of "good music". <g> Glad that it has a "mellowing" effect for you too.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Several part series to implement Internet Explorer 11 Enterprise Mode
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question