momenimum Posted July 25, 2018 Share Posted July 25, 2018 Hi, the Audio fadeIn() example and my own tests show that it's not working, it just plays at full volume from the start, even if I set the duration to something very high like 10000. The opposite fadeOut() seems to be working fine. Has anyone else experienced this? Also along with these fading functions I wanted the sound.volume = 0.25 to be kept there even when using the fadeIn() or fadeOut() functions. For example if I set my music to volume = 0.25, then I tell it to fadeIn() it should fade from 0.0 to 0.25, or fadeOut() from 0.25 to 0.0. That or maybe put the target volumes in the function such as fadeIn(1000,0.25) and fadeOut(1000,0.25). Let me know what you think. https://www.panda2.io/examples#audio-fadeIn Thanks! Wolfsbane 1 Quote Link to comment Share on other sites More sharing options...
enpu Posted July 25, 2018 Share Posted July 25, 2018 Good find, will take a look on this asap. Quote Link to comment Share on other sites More sharing options...
enpu Posted July 25, 2018 Share Posted July 25, 2018 This should be now fixed. There seems to have something changed in Chromium, since this was working earlier and no changed have been made to fade functions. If you want to fadeIn your sound into specific volume, just set the volume property before calling fadeIn: var music = new game.Music('music.m4a'); music.play(); music.volume = 0.5; music.fadeIn(2000); // Fade in music to 50% in 2 seconds Wolfsbane 1 Quote Link to comment Share on other sites More sharing options...
momenimum Posted July 25, 2018 Author Share Posted July 25, 2018 Hi @enpu thanks very much, it's working great! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.