Quantcast
Viewing all articles
Browse latest Browse all 3527

Modal Dialog Interferes with Windows Media Player

We have a problem where a modal dialog is preventing Windows Media Player from playing a sound.  What's interesting is that it only does it when the modal dialog is launched by a child window.  If the modal dialog is launched by the parent window, the sound plays without issue.

Consider the following code...

<object id='MediaPlayer' width='0' height='0' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' type='application/x-oleobject'><param name='FileName' value='notify.wav' /><param name='PlayCount' value='9999' /></object><script>

	var child = window.open("child.htm");

        window.setTimeout("window.showModalDialog('child.htm');", 5000);
        window.setTimeout("child.showModalDialog('child.htm');", 15000);</script>

First, we program Windows Media Player to loop a sound.  Then open a child window and set two timers.  5 seconds later, the main window launches a modal dialog - the sound continues to loop.  (close the dialog)  10 seconds after that, the child window launches a modal dialog - and the sound stops.  Once the dialog is closed, the sound resumes.

For a live demo...  http://curtisdehaven.com:5000/ieissue/

What's up with that?



Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>