Hi all,
my paused sound resumes when using ATL+TAB to get back into the browser tour tab.
Sound plays/streams by onclick on "play hotspot", then gets paused by clicking on "pause hotspot", then I use ALT+TAB to switch to another program, then use ALT+TAB again to get back to the browser tour tab and the problem occurs:
Most of the times (not always), the paused sound resumes automatically without any other user interaction.
Is it possible the browser audio focusing may cause this in Chrome and Firefox?
I tried both streamsound and playsound, tried autopause and autounlock true/false without success.
Maybe a manual autopause action could be a workaround: Once the vtour looses focus, pause the sound and switch play to pause button, but I'm not sure how to achieve this.
Right now I use this rather dirty code:
<hotspot name="snd1play" ... enabled="true" visible="true" onclick="destroysound(s2); streamsound(s1, 's1.mp3|s1.webm', false, 1, stopallsounds();); set(hotspot[snd1pause].visible,true); set(hotspot[snd1play].visible,false);" />
<hotspot name="snd1pause" ... enabled="true" visible="false" onclick="pauseallsounds(); set(hotspot[snd1play].visible,true); set(hotspot[snd1pause].visible,false); set(hotspot[snd1play].onclick, togglesound(s1); set(hotspot[snd1pause].visible,true); set(hotspot[snd1play].visible,false); );" />
Could someone share a hint please?
Thank you!
loki