# Evt\_media\_loaded not working on vista/windows 7

**URL:** <https://www.ruby-forum.com/t/evt-media-loaded-not-working-on-vista-windows-7/196338>\
**Category:** wxRuby\
**Created:** [October 12, 2010, 2:06am UTC](https://www.ruby-forum.com/t/evt-media-loaded-not-working-on-vista-windows-7/196338 "2010-10-12T02:06:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![remosewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@remosewa](https://www.ruby-forum.com/u/remosewa)\
**Post date:** [October 12, 2010, 2:06am UTC](https://www.ruby-forum.com/t/evt-media-loaded-not-working-on-vista-windows-7/196338/1 "2010-10-12T02:06:08Z")

</div>

For some reason the evt\_media\_loaded is not being triggered on windows 7  
and windows vista. However, the same code on windows xp works just fine.  
Anybody have any ideas?

---

<div class="post-metadata">

**Author:** ![remosewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@remosewa](https://www.ruby-forum.com/u/remosewa)\
**Post date:** [October 12, 2010, 2:39am UTC](https://www.ruby-forum.com/t/evt-media-loaded-not-working-on-vista-windows-7/196338/2 "2010-10-12T02:39:58Z")

</div>

For some reason the evt\_media\_loaded is not being triggered on windows 7  
and windows vista. However, the same code on windows xp works just fine.  
Anybody have any ideas?

---

<div class="post-metadata">

**Author:** ![remosewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@remosewa](https://www.ruby-forum.com/u/remosewa)\
**Post date:** [October 12, 2010, 2:41am UTC](https://www.ruby-forum.com/t/evt-media-loaded-not-working-on-vista-windows-7/196338/3 "2010-10-12T02:41:26Z")

</div>

For some reason the evt\_media\_loaded is not being triggered on windows 7  
and windows vista. However, the same code on windows xp works just fine.  
Anybody have any ideas? What I’m trying to do is auto play audio once it  
has loaded. My solution right now has been to just user a static timer  
and hope that the audio loads within that time. Once the timer counts  
down it will try to play the audio. However, if the audio is not done  
loading it will not work correctly

---

<div class="post-metadata">

**Author:** ![remosewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@remosewa](https://www.ruby-forum.com/u/remosewa)\
**Post date:** [October 12, 2010, 11:11am UTC](https://www.ruby-forum.com/t/evt-media-loaded-not-working-on-vista-windows-7/196338/4 "2010-10-12T11:11:56Z")

</div>

HI Chase

On 12/10/2010 01:41, Chase W. wrote:

> For some reason the evt\_media\_loaded is not being triggered on windows 7  
> and windows vista. However, the same code on windows xp works just fine.  
> Anybody have any ideas?

It appears to be a bug in wxWidgets:

> **[wxTrac has been migrated to GitHub Issues - wxWidgets](https://wxwidgets.org/develop/how-to-report-issues/trac-migration/)**

We will have to wait for a fix in the underlying library - I don’t have  
Windows 7 so unfortunately I can’t look into it myself.

> What I’m trying to do is auto play audio once it  
> has loaded. My solution right now has been to just user a static timer  
> and hope that the audio loads within that time. Once the timer counts  
> down it will try to play the audio. However, if the audio is not done  
> loading it will not work correctly

There is some discussion on this page - but it sounds like the final  
workaround is similar, ie call sleep(1) after load.

> **[BUG with WxMediaCtrl wxEVT\_MEDIA\_LOADED? - wxWidgets Discussion Forum](https://forums.wxwidgets.org/viewtopic.php?t=18761)**

alex
