Can anyone tell me how to return event, This is a button that SKIP song, and this make sound stop gradually, but when song changed the volume is 0 and cant hear nothing, how to make it to 1 again after event finnished?
<script>
function fadeOut() {
var volume = 1;
var fade = setInterval(function () {
api_setVolume(players[0], volume);
volume -= .1;
if (volume === 0)
clearInterval(fade);
}, 1000);
}
</script>
<a href='javascript:void(0)' onClick="fadeOut();">Fade Out</a>