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
388 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now