Greetings.
I've several audio files in my project (html based animations), playing in different actions. I labeled every sound as;
var audio1 = document.createElement('audio');
var audio2 = document.createElement('audio');
audio1 .setAttribute('src', 'audio/audio1.mp3');
audio2.setAttribute('src', 'audio/audio2.mp3'); etc.
And playing them during animation with TweenMax (like audio1.play, TweenMax.to(audio1, 1, {volume:0...)
I'm trying to mute all sounds if visitor leaves to another tab; with $(window).blur and focus functions,
but active audio is changing during animation, so i need to get back to active audio file when user returns the tab.
How can i mute the volume of the tab?
Thank you very much in advance for all your help.