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
392 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
[X]
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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

752 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