I
I
Ilya Korablev2015-01-03 20:14:56
Audio
Ilya Korablev, 2015-01-03 20:14:56

Soft turn off audio recording?

How to make it so that when a person presses pause to stop a musical composition, it smoothly turns off? Like in VK

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2015-01-03
@swipeshot

var intId = setInterval(function(){
    audio.volume-=0.01;
    if(audio.volume <= 0.01){
        audio.pause();
        clearInterval(intId);
    }
},20)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question