1

I'm embedding windows media player in a windows sidebar gadget. As soon as I start the player (even if i stop it after doing so), hitting WIN+D ("Show Desktop") hides my gadget (all other gadgets stay visible). What's causing this issue and is there a way to fix this annoying behaviour?

The problem occurs both with a media player embedded in the HTML and with one created with new ActiveXObject(...).

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636

1 Answers1

1

As I was looking for an solution to this question (on StackOverflow). I found that 'styling' media player instance

<object id="mediaPlayer" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"></object>

with this CSS

#mediaPlayer { position: absolute; z-index: -1; }

was all that it took to have it not disappearing.

EDIT: 'Unfortunately' this did fix it, except when you start the player once 'touched' the Gadget would disappear like before.

I did find a way to 'fix' it. It appears not to happen when you use video in the player. It doesn't care if it's viewable. So you could consider finding a video stream for the audio you want to hear. In my case: I wanted to build a Gadget for the dutch radio station 3FM, and include a video stream in the the end.

This was a challenge itself: nothing more annoying than a a-sync video/audio stream. So i had to really 'think outside the box': the flyout consists only of the station's logo. The gadget itself is 'viewable' within the specified range. Except the video stream-container-div is hidden until requested to view and I invoke the gadget's flyout. So in the end: I fixed it, but it's no solution to the original question...

For those interested in the solution: 3FM-2011.gadget download

Community
  • 1
  • 1
Bas van Ommen
  • 1,243
  • 2
  • 12
  • 20
  • I'll be glad to upvote+accept your answer if you upload a minimal gadget as a testcase somewhere. For my own gadget I switched to a self-written player (using C# and bass.dll) so I don't have a gadget using WMP anymore to test it. – ThiefMaster Apr 04 '11 at 07:21
  • Don't know if you're notified when I edit my original message... Hope you like the solution. – Bas van Ommen Apr 07 '11 at 13:31