Fading volume nicely with JS
May 14, 2011 9:56 AM Subscribe
posted by The Winsome Parker Lewis to computers & internet (4 answers total)
I'm totally new to jQuery, so forgive me if this is obvious. I have an audio player with a setVolume(percent) method. Rather than jumping straight to a volume level, I want to fade in from 0% or fade out from 100% over a duration of, say, five seconds.
As far as I can tell, I want something like .animate() in jQuery, except that only modifies CSS properties. Instead, I want to fire the player's setVolume() method repeatedly. Any help you can provide would be great!