Solved

Setting windows media object to width and height="0" shrinks player to a single pixel, not completely hidden.

Posted on 2004-08-14
5
389 Views
Last Modified: 2008-03-06
Heres the code:
<OBJECT ID="Player" height="0" width="0"
       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="autoStart" value="True">
  <PARAM name="volume" value="100">
  <PARAM name="uiMode" value="invisible">
</OBJECT>


But for some reason it just shrinks the player down to a single white pixel. I notice it because my background is black. And I can even right click on the pixel to pull up the players context menu.

How to i completely hide the player?

Thanks in advance!
0
Comment
Question by:majnun
  • 3
5 Comments
 
LVL 15

Accepted Solution

by:
Colosseo earned 500 total points
ID: 11799048
Hi

can you maybe use style to hide the player so in the start of your code

<OBJECT style="visibility:hidden" ID="Player" ....

not sure how that will affect the operation of the player, dont think it will though. You wont be able to right click it

The following link is an explanation of visibility http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/visibility.asp

When using visibility the object will still take up space... in which case style="display:none" might work instead.

I tested both and the pixel disappeared on my page using either option.

Regards

Scott
0
 
LVL 15

Expert Comment

by:Colosseo
ID: 11799078
You could instead use a combination of the following params to hide the player

  <PARAM name="ShowControls" value="0">
  <PARAM name="ShowDisplay" value="0">
  <PARAM name="ShowStatusBar" value="0">

I am trying to find a good reference regards these parameters for you as microsofts

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay/mmp_sdk/paramtags.asp

doesnt seem to mention these

Scott

0
 

Expert Comment

by:Oneblueconservative
ID: 11799748
You can also add the following to the OBJECT tag: style="display: none". Like this:

<OBJECT ID="Player" style="display: none" height="0" width="0"
0
 

Author Comment

by:majnun
ID: 11802113
Thanks!
0
 
LVL 15

Expert Comment

by:Colosseo
ID: 11802270
Your welcome majnun, glad to help and thanks for the Grade

Regards

Scott
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

772 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