Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

check if audio element is playing css

var myAudio = document.getElementById('myAudioID');

if (myAudio.duration > 0 && !myAudio.paused) {

    //Its playing...do your job

} else {

    //Not playing...maybe paused, stopped or never played.

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #audio #element #playing #css
ADD COMMENT
Topic
Name
6+4 =